mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
add builtin mapping support (not used yet) and fix an uninitialized
variable
This commit is contained in:
parent
acd54afff7
commit
d7592781d7
2 changed files with 6 additions and 2 deletions
|
@ -316,6 +316,7 @@ struct progs_s {
|
|||
struct hashtab_s *builtin_hash;
|
||||
struct hashtab_s *builtin_num_hash;
|
||||
unsigned bi_next;
|
||||
unsigned (*bi_map)(progs_t *pr, unsigned binum);
|
||||
|
||||
struct hashtab_s *function_hash;
|
||||
struct hashtab_s *global_hash;
|
||||
|
|
|
@ -189,10 +189,13 @@ PR_RelocateBuiltins (progs_t *pr)
|
|||
func->first_statement = -bi->binum;
|
||||
}
|
||||
|
||||
bi = PR_FindBuiltinNum (pr, -func->first_statement);
|
||||
ind = -func->first_statement;
|
||||
if (pr->bi_map)
|
||||
ind = pr->bi_map (pr, ind);
|
||||
bi = PR_FindBuiltinNum (pr, ind);
|
||||
if (!bi || !(proc = bi->proc)) {
|
||||
Sys_DPrintf ("WARNING: Bad builtin call number: %s = #%d\n",
|
||||
bi_name, ind);
|
||||
bi_name, -func->first_statement);
|
||||
proc = bi_no_function;
|
||||
}
|
||||
((bfunction_t *) func)->func = proc;
|
||||
|
|
Loading…
Reference in a new issue