From: cloudwalk Date: Tue, 19 May 2020 14:06:35 +0000 (+0000) Subject: Temporary workaround for tempstring offset console spam in Xonotic. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5b2ec1438c9e82b9fa6c85ecc1d29b84fbc1a66e;p=xonotic%2Fdarkplaces.git Temporary workaround for tempstring offset console spam in Xonotic. Check if garbage collection is enabled before calling PRVM_GetString when handling OP_STORE_S or OP_STOREP_S git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12540 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 256676e9..a6c45c98 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -1,3 +1,4 @@ +extern cvar_t prvm_garbagecollection_enable; // NEED to reset startst after calling this! startst may or may not be clobbered! #define ADVANCE_PROFILE_BEFORE_JUMP() \ prog->xfunction->profile += (st - startst); \ @@ -289,7 +290,8 @@ // against a certain sort of repeated migration to earlier // points in the scan that could otherwise result in the string // being freed for being unused - PRVM_GetString(prog, OPA->_int); + if(prvm_garbagecollection_enable.integer) + PRVM_GetString(prog, OPA->_int); OPB->_int = OPA->_int; DISPATCH_OPCODE(); HANDLE_OPCODE(OP_STORE_V): @@ -338,7 +340,8 @@ // against a certain sort of repeated migration to earlier // points in the scan that could otherwise result in the string // being freed for being unused - PRVM_GetString(prog, OPA->_int); + if(prvm_garbagecollection_enable.integer) + PRVM_GetString(prog, OPA->_int); ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int); ptr->_int = OPA->_int; DISPATCH_OPCODE();