]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix infinite loop bugs in InfoString_SetValue
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 24 Feb 2006 05:17:36 +0000 (05:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 24 Feb 2006 05:17:36 +0000 (05:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6023 d7cf8633-e32d-0410-b094-e92efae38249

common.c

index 34105dbbf017420ef2342335a3ff0ece6b9fdbd0..1bec373bdcc501a01e75608f2872bcd959e9a483 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1326,8 +1326,8 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con
        pos2 = pos;
        if (buffer[pos] == '\\')
        {
-               for (pos2++;buffer[pos2] && buffer[pos2] != '\\';pos++);
-               for (pos2++;buffer[pos2] && buffer[pos2] != '\\';pos++);
+               for (pos2++;buffer[pos2] && buffer[pos2] != '\\';pos2++);
+               for (pos2++;buffer[pos2] && buffer[pos2] != '\\';pos2++);
        }
        if (bufferlength <= 1 + strlen(key) + 1 + strlen(value) + strlen(buffer + pos2))
        {