diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-03-08 15:28:27 -0600 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-03-19 16:41:18 +0000 |
commit | 525574297e6c6cca38898941d84f676eae42926f (patch) | |
tree | cabe9208d372762c0314c73d92c61f0a860dc9a8 /src/renderergl2 | |
parent | ffa02b557a039421a3348cf6cc7712f704197ca5 (diff) |
Fix size reserved for IQM jointMats (allocated more than used)
Diffstat (limited to 'src/renderergl2')
-rw-r--r-- | src/renderergl2/tr_model_iqm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderergl2/tr_model_iqm.c b/src/renderergl2/tr_model_iqm.c index 2d21f6de..41783de8 100644 --- a/src/renderergl2/tr_model_iqm.c +++ b/src/renderergl2/tr_model_iqm.c @@ -423,7 +423,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na // allocate the model and copy the data size = sizeof(iqmData_t); size += header->num_meshes * sizeof( srfIQModel_t ); - size += header->num_joints * header->num_frames * 12 * sizeof( float ); // joint mats + size += header->num_joints * 12 * sizeof( float ); // joint mats size += header->num_joints * header->num_frames * 12 * sizeof( float ); // pose mats if(header->ofs_bounds) size += header->num_frames * 6 * sizeof(float); // model bounds @@ -450,7 +450,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na iqmData->num_joints = header->num_joints; iqmData->surfaces = (srfIQModel_t *)(iqmData + 1); iqmData->jointMats = (float *) (iqmData->surfaces + iqmData->num_surfaces); - iqmData->poseMats = iqmData->jointMats + 12 * header->num_joints * header->num_frames; + iqmData->poseMats = iqmData->jointMats + 12 * header->num_joints; if(header->ofs_bounds) { iqmData->bounds = iqmData->poseMats + 12 * header->num_joints * header->num_frames; |