]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix ev_field parser for savegames
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 13:24:42 +0000 (13:24 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Mar 2008 13:24:42 +0000 (13:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8173 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index 56f980f3dfc02f93d72a5d4b0613cfd6b76ab305..1dc7024a2d4d82374d4d04a891ce6f303b5575c2 100644 (file)
@@ -982,7 +982,12 @@ qboolean PRVM_ED_ParseEpair(prvm_edict_t *ent, ddef_t *key, const char *s)
                break;
 
        case ev_field:
-               def = PRVM_ED_FindField(s);
+               if (*s != '.')
+               {
+                       Con_DPrintf("PRVM_ED_ParseEpair: Bogus field name %s in %s\n", s, PRVM_NAME);
+                       return false;
+               }
+               def = PRVM_ED_FindField(s + 1);
                if (!def)
                {
                        Con_DPrintf("PRVM_ED_ParseEpair: Can't find field %s in %s\n", s, PRVM_NAME);