[gamecode] Allow stack with no heap

Trying to use stack without a heap allocated would result in some very
bogus stack info.
This commit is contained in:
Bill Currie 2023-09-12 22:13:18 +09:00
parent 8ec66f118a
commit ea02af57eb

View file

@ -269,7 +269,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
pr->pr_statements = (dstatement_t *) (base + pr->progs->statements.offset);
pr->pr_globals = (pr_type_t *) (base + pr->progs->globals.offset);
pr->stack = (pr_type_t *) ((byte *) pr->zone + pr->zone_size);
pr->stack = (pr_type_t *) (heap + pr->zone_size);
pr->stack_bottom = pr->stack - pr->pr_globals;
pr->globals_size = (pr_type_t *) ((byte *) pr->stack + pr->stack_size)
- pr->pr_globals;