]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
patch from Blub\0 to fix InfoString_SetValue (my dpsnprintf size was
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 23 Jun 2008 12:48:56 +0000 (12:48 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 23 Jun 2008 12:48:56 +0000 (12:48 +0000)
wrong)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8371 d7cf8633-e32d-0410-b094-e92efae38249

common.c

index 499dccfd49f3ab7a9ca8e956e0982da6c92a3683..c9248464517a1642835cd06effb11b7af39b76c5 100644 (file)
--- a/common.c
+++ b/common.c
@@ -2030,7 +2030,7 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con
                // set the key/value and append the remaining text
                char tempbuffer[4096];
                strlcpy(tempbuffer, buffer + pos2, sizeof(tempbuffer));
-               dpsnprintf(buffer + pos, sizeof(buffer) - pos, "\\%s\\%s%s", key, value, tempbuffer);
+               dpsnprintf(buffer + pos, bufferlength - pos, "\\%s\\%s%s", key, value, tempbuffer);
        }
        else
        {