]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a bug with the divide by zero warning in the QC VM, it was not updating the relev...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Aug 2006 08:52:53 +0000 (08:52 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 27 Aug 2006 08:52:53 +0000 (08:52 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6571 d7cf8633-e32d-0410-b094-e92efae38249

prvm_execprogram.h

index 78d859e0a25a4b0b0b35b6a5d9d1ed0e0f937558..82f1a97a3c60793fe5d9627fd9a2163b8c1f3719 100644 (file)
                                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;