From 16899228d96d10853ff46cac2e24ab311b44e574 Mon Sep 17 00:00:00 2001 From: "Chris Hall (GMCH)" Date: Thu, 10 Dec 2009 13:40:05 +0000 Subject: Fix reaming of empty symbol table -- lib/symtab.c --- lib/symtab.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/symtab.c') diff --git a/lib/symtab.c b/lib/symtab.c index 885be426..57a49396 100644 --- a/lib/symtab.c +++ b/lib/symtab.c @@ -423,7 +423,8 @@ symbol_table_ream(symbol_table table, int free_structure) symbol sym ; unsigned int i ; - i = table->base_count ; + /* There are no actual bases until they have been allocated. */ + i = (table->bases != NULL) ? table->base_count : 0 ; while (i--) { @@ -453,7 +454,7 @@ symbol_table_ream(symbol_table table, int free_structure) } ; symbol_table_reset(table, free_structure) ; - + /* asserts(table->entry_count == 0) */ return NULL ; } ; -- cgit v1.2.3