]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix stupid bug in \n and \r parsing
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Mar 2008 21:32:15 +0000 (21:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 23 Mar 2008 21:32:15 +0000 (21:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8228 d7cf8633-e32d-0410-b094-e92efae38249

prvm_edict.c

index fea28867e094e3c2f401eb2f82df61f1a43edf8e..c6d5d77c184a2a51b3ca1ede61b992632e7d3bc2 100644 (file)
@@ -931,12 +931,12 @@ qboolean PRVM_ED_ParseEpair(prvm_edict_t *ent, ddef_t *key, const char *s, qbool
                val->string = PRVM_AllocString(l, &new_p);
                for (i = 0;i < l;i++)
                {
-                       if (s[i] == '\\' && i < l-1 && s[i] == 'n' && parsebackslash)
+                       if (s[i] == '\\' && s[i+1] == 'n' && parsebackslash)
                        {
                                i++;
                                *new_p++ = '\n';
                        }
-                       else if (s[i] == '\\' && i < l-1 && s[i] == 'r' && parsebackslash)
+                       else if (s[i] == '\\' && s[i+1] == 'r' && parsebackslash)
                        {
                                i++;
                                *new_p++ = '\r';