]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix uninitialized variables in InfoString_GetValue and InfoString_SetValue
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 18:22:09 +0000 (18:22 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 12 Feb 2006 18:22:09 +0000 (18:22 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5973 d7cf8633-e32d-0410-b094-e92efae38249

common.c

index 8bc5a3d595dc745ba80a7cce82975b4b5ed9ee7c..34105dbbf017420ef2342335a3ff0ece6b9fdbd0 100644 (file)
--- a/common.c
+++ b/common.c
@@ -1256,7 +1256,7 @@ char *SearchInfostring(const char *infostring, const char *key)
 
 void InfoString_GetValue(const char *buffer, const char *key, char *value, size_t valuelength)
 {
-       int pos, j;
+       int pos = 0, j;
        size_t keylength;
        if (!key)
                key = "";
@@ -1298,7 +1298,7 @@ void InfoString_GetValue(const char *buffer, const char *key, char *value, size_
 
 void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, const char *value)
 {
-       int pos, pos2;
+       int pos = 0, pos2;
        size_t keylength;
        if (!key)
                key = "";