Fixed findkeysforcommand hopefully.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jan 2004 18:48:36 +0000 (18:48 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Jan 2004 18:48:36 +0000 (18:48 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3806 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index c87a72d..f6a92d2 100644 (file)
@@ -3108,14 +3108,14 @@ void VM_M_findkeysforcommand(void)
        
        VM_CheckEmptyString(cmd);
 
-       ret = VM_GetTempString();
+       (ret = VM_GetTempString())[0] = 0;
        
        M_FindKeysForCommand(cmd, keys);
 
        for(i = 0; i < NUMKEYS; i++)
-               ret = va("%s \'%i\'", ret, keys[i]);
+               ret = strcat(ret, va(" \'%i\'", keys[i]));
 
-       PRVM_G_FLOAT(OFS_RETURN) = PRVM_SetString(ret);
+       PRVM_G_INT(OFS_RETURN) = PRVM_SetString(ret);
 }
 
 prvm_builtin_t vm_m_builtins[] = {