diff options
author | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 17:01:47 +0200 |
---|---|---|
committer | Marc Sunet <jeannekamikaze@gmail.com> | 2012-08-29 17:01:47 +0200 |
commit | 830a803295ec0a6c9fea92d983c2eb4f0b646112 (patch) | |
tree | c0379424b00e7b6279cb8b807e8746da6a20c3be | |
parent | c2bdfc5baee9e6418206e11fc0c3f0bb1b249f9f (diff) |
Fixed array allocation in modelBoxes
-rw-r--r-- | Spear/Assets/Model.hsc | 2 |
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" | |||
452 | modelBoxes :: Model -> IO (V.Vector Box) | 452 | modelBoxes :: Model -> IO (V.Vector Box) |
453 | modelBoxes model = | 453 | modelBoxes 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 [] |