From c585a17db94acbe22bfc4d75de3b0d8a7b68720f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 23 Feb 2011 08:04:09 +0900 Subject: [PATCH] Give type data a null pointer. Pointers to the void type descriptor looked just like null pointers and that was terribly confusing. Avoid that confusion by pre-allocating a small amount of data in order to reserve space for a null descriptor. --- tools/qfcc/source/qfcc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index a8d1c4f4c..c059ff37c 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -146,6 +146,7 @@ InitData (void) pr.near_data->grow = 0; pr.type_data = new_defspace (); + defspace_new_loc (pr.type_data, 4); // reserve space for a null descriptor pr.symtab = new_symtab (0, stab_global); pr.symtab->space = pr.near_data;