]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix a small bug in prvm_getstring (returning NULL instead of "")
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 14 Aug 2009 19:29:03 +0000 (19:29 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 14 Aug 2009 19:29:03 +0000 (19:29 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9112 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index e0f3773275c14789a983cb7dbdab01e7e6a06aa6..5da0a8fbd6adaf0a0e34050bd70d2274aaff5166 100644 (file)
@@ -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