From 992aa0499477b51bc23222ee35beef881d7091cd Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 10 Apr 2007 14:03:34 +0000 Subject: [PATCH] Forgot to coorect the adjustment of the def's offset (yet I knew I was supposed to :P) --- tools/qfcc/source/globals.c | 3 ++- tools/qfcc/source/qfcc.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qfcc/source/globals.c b/tools/qfcc/source/globals.c index cddfabcc3..ab9785471 100644 --- a/tools/qfcc/source/globals.c +++ b/tools/qfcc/source/globals.c @@ -152,13 +152,14 @@ dump_functions (progs_t *pr) else comment = va (" = #%d", -start); - printf ("%-5d %s%s: %d", i, name, comment, func->numparms); + printf ("%-5d %s%s: %d (", i, name, comment, func->numparms); if (func->numparms < 0) count = -func->numparms - 1; else count = func->numparms; for (j = 0; j < count; j++) printf (" %d", func->parm_size[j]); + printf (") %d @ %d", func->locals, func->parm_start); puts (""); } } diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index bb3686cb2..389e5ad28 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -464,7 +464,7 @@ finish_compilation (void) num_localdefs += f->scope->space->size; } for (def = f->scope->head; def; def = def->def_next) { - def->ofs += pr.near_data->size; + def->ofs += df->parm_start; relocate_refs (def->refs, def->ofs); } }