From d05ade804ec1789157049868deef2fc1aa09f45f Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 14 Aug 2009 19:29:03 +0000 Subject: [PATCH] fix a small bug in prvm_getstring (returning NULL instead of "") git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9112 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_edict.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prvm_edict.c b/prvm_edict.c index e0f37732..5da0a8fb 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -2338,7 +2338,10 @@ const char *PRVM_GetString(int num) if (num < prog->numknownstrings) { if (!prog->knownstrings[num]) + { VM_Warning("PRVM_GetString: Invalid zone-string offset (%i has been freed)\n", num); + return ""; + } return prog->knownstrings[num]; } else -- 2.39.2