# HG changeset patch # User Scott Ehlert # Date 1186524191 0 # Node ID 13d77c75c6b9bdee9fc4e7bc8603ab0c50c1456b # Parent ef8dd1cddc35856a3053500fc5a820829a378459 Fixed crash/freeze bug in compiler where free was being used on a bad pointer (was an oversight when adding deprecation support for macros) diff -r ef8dd1cddc35 -r 13d77c75c6b9 sourcepawn/compiler/sclist.c --- a/sourcepawn/compiler/sclist.c Tue Aug 07 18:55:44 2007 +0000 +++ b/sourcepawn/compiler/sclist.c Tue Aug 07 22:03:11 2007 +0000 @@ -62,6 +62,7 @@ cur->first=duplicatestring(first); cur->second=duplicatestring(second); cur->matchlength=matchlength; + cur->documentation=NULL; if (cur->first==NULL || cur->second==NULL) { if (cur->first!=NULL) free(cur->first); @@ -343,6 +344,11 @@ item=find_stringpair(item,name,length); if (item==NULL) return FALSE; + if (item->documentation) + { + free(item->documentation); + item->documentation=NULL; + } delete_stringpair(&substpair,item); adjustindex(*name); return TRUE;