From: divverent Date: Mon, 24 Aug 2009 05:41:33 +0000 (+0000) Subject: chnage "negative zero" check to actually check the bit pattern of IEEE negative zeros... X-Git-Tag: xonotic-v0.1.0preview~1488 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79e93e2deaa3db0e02fa9ec1ff1268bb02a14254;p=xonotic%2Fdarkplaces.git chnage "negative zero" check to actually check the bit pattern of IEEE negative zeros; might fix motorsep's problems on Win32/SDL only (maybe SDL changes FPU parameters?) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9141 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/prvm_execprogram.h b/prvm_execprogram.h index 97bf15d7..f29299d2 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -259,8 +259,8 @@ //================== case OP_IFNOT: - if (!OPA->_float) - // TODO add an "int-ifnot" + if (!(OPA->_int & 0x7FFFFFFF)) // also match "negative zero" floats of value 0x80000000 + // TODO add an "int-if", and change this one to OPA->_float // although mostly unneeded, thanks to the only float being false being 0x0 and 0x80000000 (negative zero) // and entity, string, field values can never have that value { @@ -280,8 +280,8 @@ break; case OP_IF: - if (OPA->_float) - // TODO add an "int-if" + if (!(OPA->_int & 0x7FFFFFFF)) // also match "negative zero" floats of value 0x80000000 + // TODO add an "int-if", and change this one to OPA->_float // although mostly unneeded, thanks to the only float being false being 0x0 and 0x80000000 (negative zero) // and entity, string, field values can never have that value {