mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 10:21:21 +00:00
[gamecode] Make def type when indexing size
Fixes #12
However, this is a bit of a band-aid in that the code for global defs
seems redundant (there is very similar code a little above that is
always executed) and the code for field defs should probably be executed
unconditionally: I suspect the problem fixed by
d5454faeb7
still shows with game coded
compiled with recent versions of the compiler, I just haven't tested
any.
This commit is contained in:
parent
36df16eefc
commit
2278f5e494
1 changed files with 3 additions and 3 deletions
|
@ -257,7 +257,7 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
|
|||
pr->pr_statements[i].c = LittleShort (pr->pr_statements[i].c);
|
||||
}
|
||||
|
||||
for (i = 0; i < (size_t) pr->progs->numfunctions; i++) {
|
||||
for (i = 0; i < pr->progs->numfunctions; i++) {
|
||||
pr->pr_functions[i].first_statement =
|
||||
LittleLong (pr->pr_functions[i].first_statement);
|
||||
pr->pr_functions[i].parm_start =
|
||||
|
@ -328,11 +328,11 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
|
|||
pr_def_t *def;
|
||||
for (def = pr->pr_globaldefs, i = 0; i < pr->progs->numglobaldefs;
|
||||
i++, def++) {
|
||||
def->size = pr_type_size[def->type];
|
||||
def->size = pr_type_size[def->type & ~DEF_SAVEGLOBAL];
|
||||
}
|
||||
for (def = pr->pr_fielddefs, i = 0; i < pr->progs->numfielddefs;
|
||||
i++, def++) {
|
||||
def->size = pr_type_size[def->type];
|
||||
def->size = pr_type_size[def->type & ~DEF_SAVEGLOBAL];
|
||||
}
|
||||
}
|
||||
pr->pr_trace = 0;
|
||||
|
|
Loading…
Reference in a new issue