From: Thomas Debesse Date: Tue, 12 Feb 2019 03:13:56 +0000 (+0100) Subject: Garux: qnan workaround like in latest master X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6291935031c28286b34cbf4b483181e51c1d8ea6;p=xonotic%2Fnetradiant.git Garux: qnan workaround like in latest master --- diff --git a/libs/stringio.h b/libs/stringio.h index f8814ba8..9003bca8 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -232,15 +232,15 @@ inline bool Tokeniser_getFloat( Tokeniser& tokeniser, float& f ){ if ( token != 0 && string_parse_float( token, f ) ) { return true; } - #define GARUX_DISABLE_QNAN_FALLBACK - #ifndef GARUX_DISABLE_QNAN_FALLBACK //fallback for 1.#IND 1.#INF 1.#QNAN cases, happening sometimes after rotating & often scaling with tex lock in BP mode else if ( token != 0 && strstr( token, ".#" ) ) { globalErrorStream() << "Warning: " << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": expected parse problem at '" << token << "': wanted '#number'\nProcessing anyway\n"; + #define GARUX_DISABLE_QNAN_FALLBACK + #ifndef GARUX_DISABLE_QNAN_FALLBACK *strstr( token, ".#" ) = '\0'; + #endif return true; } - #endif Tokeniser_unexpectedError( tokeniser, token, "#number" ); return false; }