]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Added wasfreed() to menuqc builtinlist. Hushed "VM_bufstr_get: invalid string index...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 7 Jan 2011 18:31:37 +0000 (18:31 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 7 Jan 2011 18:31:37 +0000 (18:31 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10693 d7cf8633-e32d-0410-b094-e92efae38249

mvm_cmds.c
prvm_cmds.c

index 4f7e30197f7fd6944792b0bd3448aa8ebdef2e03..41c476cf035e329271230fb032ad99ba66d64d61 100644 (file)
@@ -1226,7 +1226,7 @@ VM_CL_isdemo,                                                     // #349
 NULL,                                                                  // #350
 NULL,                                                                  // #351
 NULL,                                                                  // #352
-NULL,                                                                  // #353
+VM_wasfreed,                                                   // #353 float(entity ent) wasfreed
 NULL,                                                                  // #354
 VM_CL_videoplaying,                                            // #355
 VM_findfont,                                                   // #356 float(string fontname) loadfont (DP_GFX_FONTS)
index f2c0e54d57ededb37c9eaef2e0907762448bae42..2630a9db30ee0d462f1ba409346d36517a8f94de 100644 (file)
@@ -4750,7 +4750,7 @@ void VM_buf_create (void)
        for (i = 0;stringbuffer != Mem_ExpandableArray_RecordAtIndex(&prog->stringbuffersarray, i);i++);
        stringbuffer->origin = PRVM_AllocationOrigin();
        // optional flags parm
-       if(prog->argc == 2)
+       if (prog->argc >= 2)
                stringbuffer->flags = (int)PRVM_G_FLOAT(OFS_PARM1) & 0xFF;
        PRVM_G_FLOAT(OFS_RETURN) = i;
 }
@@ -4964,7 +4964,7 @@ void VM_bufstr_get (void)
        strindex = (int)PRVM_G_FLOAT(OFS_PARM1);
        if (strindex < 0)
        {
-               VM_Warning("VM_bufstr_get: invalid string index %i used in %s\n", strindex, PRVM_NAME);
+               // VM_Warning("VM_bufstr_get: invalid string index %i used in %s\n", strindex, PRVM_NAME);
                return;
        }
        if (strindex < stringbuffer->num_strings && stringbuffer->strings[strindex])