made darkplaces compile successfully with g++ to test for errors C doesn't care about...
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 2b0017a..b17c3f6 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -553,7 +553,7 @@ Key_KeynumToString (int keynum)
 void
 Key_SetBinding (int keynum, int bindmap, const char *binding)
 {
-       char *new;
+       char *newbinding;
        size_t l;
 
        if (keynum == -1)
@@ -566,10 +566,10 @@ Key_SetBinding (int keynum, int bindmap, const char *binding)
        }
 // allocate memory for new binding
        l = strlen (binding);
-       new = Z_Malloc (l + 1);
-       strcpy (new, binding);
-       new[l] = 0;
-       keybindings[bindmap][keynum] = new;
+       newbinding = (char *)Z_Malloc (l + 1);
+       strcpy (newbinding, binding);
+       newbinding[l] = 0;
+       keybindings[bindmap][keynum] = newbinding;
 }
 
 static void