From da14c95bb8b8400cdc04c369f91811733972382d Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 8 Feb 2011 22:26:35 +0900 Subject: [PATCH] Initialize current_symtab in class_init() when necessary. If an objective-qc symbol is the first token to be read, class_init() is called before the parser gets a chance to perform the initialization action. However, class_init() setting current_symtab if the first objective-qc symbol is seen in a function body would be bad. --- tools/qfcc/source/class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qfcc/source/class.c b/tools/qfcc/source/class.c index 3c6d543e7..f621306a7 100644 --- a/tools/qfcc/source/class.c +++ b/tools/qfcc/source/class.c @@ -277,6 +277,8 @@ class_init (void) { symbol_t *sym; + if (!current_symtab) + current_symtab = pr.symtab; init_classes (); init_objective_structs ();