From: res Date: Mon, 17 Dec 2007 02:19:50 +0000 (+0000) Subject: Fix use of wrong pointer in Q3 shader hash add. X-Git-Tag: xonotic-v0.1.0preview~2686 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dc4f747af2ddefc9a99651dadd4e460f431578c9;p=xonotic%2Fdarkplaces.git Fix use of wrong pointer in Q3 shader hash add. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7805 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_shared.c b/model_shared.c index a162eda8..5dcafffa 100644 --- a/model_shared.c +++ b/model_shared.c @@ -1151,7 +1151,7 @@ static void Q3Shader_AddToHash (q3shaderinfo_t* shader) q3shader_hash_entry_t* newEntry = (q3shader_hash_entry_t*) Mem_ExpandableArray_AllocRecord (&q3shader_data->hash_entries); - while (entry->chain != NULL) entry = entry->chain; + while (lastEntry->chain != NULL) lastEntry = lastEntry->chain; lastEntry->chain = newEntry; newEntry->chain = NULL; lastEntry = newEntry;