Skip to content

Commit

Permalink
Use isnan to test for NaN
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium authored and jamienicol committed Aug 21, 2020
1 parent fccb278 commit 0727229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/glsl/ir_print_glsl_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0727229

Please sign in to comment.