From aad21e3c003b29a21f34214ba61be029290cc0e4 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 5 Mar 2001 04:15:59 +0000 Subject: [PATCH] put the pointer comparison back in so dynamic strings don't cause blowouts --- libs/gamecode/pr_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/gamecode/pr_exec.c b/libs/gamecode/pr_exec.c index b3c9aff5b..375701425 100644 --- a/libs/gamecode/pr_exec.c +++ b/libs/gamecode/pr_exec.c @@ -965,7 +965,7 @@ char * PR_GetString (progs_t * pr, int num) { if (num < 0) { - //Con_DPrintf("GET:%d == %s\n", num, pr->pr_strtbl[-num]); + Con_DPrintf("GET:%d == %s\n", num, pr->pr_strtbl[-num]); return pr->pr_strtbl[-num]; } return pr->pr_strings + num; @@ -978,7 +978,8 @@ PR_SetString (progs_t * pr, char *s) if (i < 0 || i > pr->pr_stringsize) { for (i = 1; i <= pr->num_prstr; i++) - if (strequal (pr->pr_strtbl[i], s)) + if (pr->pr_strtbl[i] == s + || strequal (pr->pr_strtbl[i], s)) break; if (i < pr->num_prstr) return -i;