fix a segmentation fault in PR_PrintStatement caused by bogus prototypes

This commit is contained in:
Bill Currie 2001-01-16 03:15:23 +00:00
parent 2e882dd198
commit bae13155b4
4 changed files with 12 additions and 14 deletions

View file

@ -143,6 +143,9 @@ void ED_PrintNum (progs_t *pr, int ent);
void ED_Count (progs_t *pr);
void PR_Profile (progs_t *pr);
char *PR_GlobalString (progs_t *pr, int ofs);
char *PR_GlobalStringNoContents (progs_t *pr, int ofs);
eval_t *GetEdictFieldValue(progs_t *pr, edict_t *ed, char *field);
//
@ -156,6 +159,8 @@ int PR_SetString(progs_t *pr, char *s);
// externaly supplied functions
int ED_Parse_Extra_Fields (progs_t *pr, char *key, char *value);
void FindEdictFieldOffsets (progs_t *pr);
//============================================================================

View file

@ -52,9 +52,6 @@ cvar_t *r_skyname;
cvar_t *pr_boundscheck;
cvar_t *qwprog;
void SV_Error (char *error, ...);
void FindEdictFieldOffsets (progs_t *pr);
int type_size[8] = {
1,
sizeof (void *) / 4,

View file

@ -132,10 +132,6 @@ char *pr_opnames[] = {
"BITOR"
};
char *PR_GlobalString (int ofs);
char *PR_GlobalStringNoContents (int ofs);
//=============================================================================
/*
@ -154,21 +150,21 @@ PR_PrintStatement (progs_t *pr, dstatement_t *s)
}
if (s->op == OP_IF || s->op == OP_IFNOT)
Con_Printf ("%sbranch %i", PR_GlobalString ((unsigned short) s->a),
Con_Printf ("%sbranch %i", PR_GlobalString (pr, (unsigned short) s->a),
s->b);
else if (s->op == OP_GOTO) {
Con_Printf ("branch %i", s->a);
} else if ((unsigned int) (s->op - OP_STORE_F) < 6) {
Con_Printf ("%s", PR_GlobalString ((unsigned short) s->a));
Con_Printf ("%s", PR_GlobalStringNoContents ((unsigned short) s->b));
Con_Printf ("%s", PR_GlobalString (pr, (unsigned short) s->a));
Con_Printf ("%s", PR_GlobalStringNoContents (pr, (unsigned short) s->b));
} else {
if (s->a)
Con_Printf ("%s", PR_GlobalString ((unsigned short) s->a));
Con_Printf ("%s", PR_GlobalString (pr, (unsigned short) s->a));
if (s->b)
Con_Printf ("%s", PR_GlobalString ((unsigned short) s->b));
Con_Printf ("%s", PR_GlobalString (pr, (unsigned short) s->b));
if (s->c)
Con_Printf ("%s",
PR_GlobalStringNoContents ((unsigned short) s->c));
PR_GlobalStringNoContents (pr, (unsigned short) s->c));
}
Con_Printf ("\n");
}

View file

@ -1,5 +1,5 @@
/*
pr_cmds.c
sv_pr_cmds.c
(description)