From f9551807a446e312b46f933157440dfe82ff292c Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 27 Aug 2006 08:52:53 +0000 Subject: [PATCH] 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 --- prvm_execprogram.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; -- 2.39.2