From: divverent Date: Fri, 14 Aug 2009 19:29:03 +0000 (+0000) Subject: fix a small bug in prvm_getstring (returning NULL instead of "") X-Git-Tag: xonotic-v0.1.0preview~1517 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d05ade804ec1789157049868deef2fc1aa09f45f;p=xonotic%2Fdarkplaces.git 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 --- 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