]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix use of wrong pointer in Q3 shader hash add.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 02:19:50 +0000 (02:19 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 17 Dec 2007 02:19:50 +0000 (02:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7805 d7cf8633-e32d-0410-b094-e92efae38249

model_shared.c

index a162eda85066299194b8dfe312d6c4a5fa984784..5dcafffac758bb78f64a55885db82d1ba43e4ed6 100644 (file)
@@ -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;