From f8310c7ac538900f83222787acc7971d113f79b7 Mon Sep 17 00:00:00 2001 From: vortex Date: Fri, 7 Jan 2011 18:31:37 +0000 Subject: [PATCH] Added wasfreed() to menuqc builtinlist. Hushed "VM_bufstr_get: invalid string index" warning. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10693 d7cf8633-e32d-0410-b094-e92efae38249 --- mvm_cmds.c | 2 +- prvm_cmds.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mvm_cmds.c b/mvm_cmds.c index 4f7e3019..41c476cf 100644 --- a/mvm_cmds.c +++ b/mvm_cmds.c @@ -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) diff --git a/prvm_cmds.c b/prvm_cmds.c index f2c0e54d..2630a9db 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -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]) -- 2.39.2