diff --git a/src/compiler/glsl/ir_print_glsl_visitor.cpp b/src/compiler/glsl/ir_print_glsl_visitor.cpp index bdd512f1ddf..b5b03b8b17d 100644 --- a/src/compiler/glsl/ir_print_glsl_visitor.cpp +++ b/src/compiler/glsl/ir_print_glsl_visitor.cpp @@ -1462,7 +1462,7 @@ void print_float (string_buffer& buffer, float f) strcpy(tmp, "(-1.0/0.0)"); // Do similar thing for NaN - if (f != f) + if (isnan(f)) strcpy(tmp, "(0.0/0.0)"); #if _MSC_VER