From 1f391d180b9702b6859cd247bdaf94f18c677727 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 18 Mar 2013 15:55:25 -0500 Subject: Always initialize joint_names in R_LoadIQM Reported by MAN-AT-ARMS --- src/renderergl2/tr_model_iqm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/renderergl2') diff --git a/src/renderergl2/tr_model_iqm.c b/src/renderergl2/tr_model_iqm.c index 19cca777..0ea1961d 100644 --- a/src/renderergl2/tr_model_iqm.c +++ b/src/renderergl2/tr_model_iqm.c @@ -338,6 +338,8 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na return qfalse; } + joint_names = 0; + if ( header->num_joints ) { // check and swap joints @@ -346,7 +348,6 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na return qfalse; } joint = (iqmJoint_t *)((byte *)header + header->ofs_joints); - joint_names = 0; for( i = 0; i < header->num_joints; i++, joint++ ) { LL( joint->name ); LL( joint->parent ); -- cgit