[qfcc] Always test float against 0 for Ruamoko

Float is not int, and Ruamoko has only int ifz/ifnz, which will fail for
-0.0 (0x80000000 when viewed as an int). And then there's nan, but I
haven't seen too many of those in quake.
This commit is contained in:
Bill Currie 2022-02-06 20:59:49 +09:00
parent 622a2e84f4
commit 76a35c0352

View file

@ -109,8 +109,9 @@ test_expr (expr_t *e)
}
return e;
case ev_float:
if (options.code.fast_float
|| options.code.progsversion == PROG_ID_VERSION) {
if (options.code.progsversion < PROG_VERSION
&& (options.code.fast_float
|| options.code.progsversion == PROG_ID_VERSION)) {
if (!is_float(type_default)) {
if (is_constant (e)) {
return cast_expr (type_default, e);