From: havoc Date: Sun, 27 Aug 2006 08:52:53 +0000 (+0000) Subject: fix a bug with the divide by zero warning in the QC VM, it was not updating the relev... X-Git-Tag: xonotic-v0.1.0preview~3815 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f9551807a446e312b46f933157440dfe82ff292c;p=xonotic%2Fdarkplaces.git fix a bug with the divide by zero warning in the QC VM, it was not updating the relevant xfunction/xstatement variables git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6571 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 78d859e0..82f1a97a 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -50,10 +50,14 @@ if( OPB->_float != 0.0f ) { OPC->_float = OPA->_float / OPB->_float; - } - else + } + else { - if( developer.integer >= 1 ) { + if( developer.integer >= 1 ) + { + prog->xfunction->profile += (st - startst); + startst = st; + prog->xstatement = st - prog->statements; VM_Warning( "Attempted division by zero in %s\n", PRVM_NAME ); } OPC->_float = 0.0f;