From: havoc Date: Fri, 24 Feb 2006 05:17:36 +0000 (+0000) Subject: fix infinite loop bugs in InfoString_SetValue X-Git-Tag: xonotic-v0.1.0preview~4290 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8be3332ab72df182015954522011995f61c89a02;p=xonotic%2Fdarkplaces.git fix infinite loop bugs in InfoString_SetValue git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6023 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index 34105dbb..1bec373b 100644 --- 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)) {