Ok, I'm getting a really weird crash bug that I can't fix. The bt is
341 lang_free = lang_free->next;
(gdb) bt
#0 0x080ea9ae in lang_new () at language.c:341
#1 0x080ea833 in lngedit_create (ch=0x4047612c, argument=0x404731c2 "leet")
at language.c:293
#2 0x08141aa3 in do_lngedit (ch=0x4047612c, argument=0x404731c2 "leet")
at olc.c:2453
#3 0x080e8d63 in interpret (ch=0x4047612c, argument=0x404731bb "create
leet")
at interp.c:259
(gdb) p lang_free
$1 = (LANGUAGE *) 0x11
Now this is the weird thing, it claims that lang_free is NULL, right? Well,
this is the code in question.
LANGUAGE * lang_new(void)
{ static LANGUAGE lang_zero;
LANGUAGE *pLng;
if(lang_free == NULL )
pLng = alloc_perm(sizeof(*pLng) );
else
{ pLng = lang_free;
lang_free = lang_free->next; //This is where it goes down
}
*pLng = lang_zero;
STRING_NEW(pLng->name);
return pLng;
}
And I'm fairly sure my syntax is all correct, as well as logic... any help
apreciated.
Davion
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca