From 830a803295ec0a6c9fea92d983c2eb4f0b646112 Mon Sep 17 00:00:00 2001 From: Marc Sunet Date: Wed, 29 Aug 2012 17:01:47 +0200 Subject: Fixed array allocation in modelBoxes --- Spear/Assets/Model.hsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" modelBoxes :: Model -> IO (V.Vector Box) modelBoxes model = with model $ \modelPtr -> - allocaArray (numVerts model * numFrames model) $ \pointsPtr -> do + allocaArray (numVerts model * numFrames model * 4) $ \pointsPtr -> do model_compute_boxes modelPtr pointsPtr let n = numFrames model getBoxes = peekBoxes pointsPtr n 0 0 $ return [] -- cgit v1.2.3