Fix nasty crash bug

This commit is contained in:
Thilo Schulz 2011-05-09 21:47:41 +00:00
parent 36314a1622
commit 2eb9975334

View file

@ -386,8 +386,12 @@ static void sort_symbols ()
symbol_t *s; symbol_t *s;
symbol_t **symlist; symbol_t **symlist;
if(!symbols)
return;
//crumb("sort_symbols: Constructing symlist array\n"); //crumb("sort_symbols: Constructing symlist array\n");
for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ; for (elems = 0, s = symbols; s; s = s->next, elems++) /* nop */ ;
symlist = malloc(elems * sizeof(symbol_t*)); symlist = malloc(elems * sizeof(symbol_t*));
for (i = 0, s = symbols; s; s = s->next, i++) for (i = 0, s = symbols; s; s = s->next, i++)
{ {