aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 17:01:47 +0200
committerMarc Sunet <jeannekamikaze@gmail.com>2012-08-29 17:01:47 +0200
commit830a803295ec0a6c9fea92d983c2eb4f0b646112 (patch)
treec0379424b00e7b6279cb8b807e8746da6a20c3be
parentc2bdfc5baee9e6418206e11fc0c3f0bb1b249f9f (diff)
Fixed array allocation in modelBoxes
-rw-r--r--Spear/Assets/Model.hsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/Spear/Assets/Model.hsc b/Spear/Assets/Model.hsc
index 1b01062..525d377 100644
--- a/Spear/Assets/Model.hsc
+++ b/Spear/Assets/Model.hsc
@@ -452,7 +452,7 @@ foreign import ccall "Model.h model_to_ground"
452modelBoxes :: Model -> IO (V.Vector Box) 452modelBoxes :: Model -> IO (V.Vector Box)
453modelBoxes model = 453modelBoxes model =
454 with model $ \modelPtr -> 454 with model $ \modelPtr ->
455 allocaArray (numVerts model * numFrames model) $ \pointsPtr -> do 455 allocaArray (numVerts model * numFrames model * 4) $ \pointsPtr -> do
456 model_compute_boxes modelPtr pointsPtr 456 model_compute_boxes modelPtr pointsPtr
457 let n = numFrames model 457 let n = numFrames model
458 getBoxes = peekBoxes pointsPtr n 0 0 $ return [] 458 getBoxes = peekBoxes pointsPtr n 0 0 $ return []