[qwaq] Cope with functions that don't have locals

In this case, .ctor functions.
This commit is contained in:
Bill Currie 2020-04-02 00:51:22 +09:00
parent 1d5058d267
commit 118fba8df5
2 changed files with 2 additions and 2 deletions

View file

@ -482,7 +482,7 @@ qdb_get_local_defs (progs_t *pr)
pr_auxfunction_t *auxfunc = PR_Debug_MappedAuxFunction (tpr, fnum); pr_auxfunction_t *auxfunc = PR_Debug_MappedAuxFunction (tpr, fnum);
R_INT (pr) = 0; R_INT (pr) = 0;
if (auxfunc) { if (auxfunc && auxfunc->num_locals) {
pr_def_t *defs = PR_Debug_LocalDefs (tpr, auxfunc); pr_def_t *defs = PR_Debug_LocalDefs (tpr, auxfunc);
__auto_type qdefs __auto_type qdefs
= (qdb_def_t *) PR_Zone_Malloc (pr, = (qdb_def_t *) PR_Zone_Malloc (pr,

View file

@ -58,7 +58,7 @@
if (aux_func) { if (aux_func) {
defs = qdb_get_local_defs (target, fnum); defs = qdb_get_local_defs (target, fnum);
} }
if (func) { if (func && func.local_size) {
data = obj_malloc (func.local_size); data = obj_malloc (func.local_size);
} }
return self; return self;