Skip to content

Commit

Permalink
fix ValueTest/specialFloats test failure when fp:fast on msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
fo40225 committed May 5, 2018
1 parent 0221111 commit 3f0d91f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib_json/json_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p

} else {
// IEEE standard states that NaN values will not compare to themselves
if (value != value) {
if (isnan(value)) {
len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "NaN" : "null");
} else if (value < 0) {
len = snprintf(buffer, sizeof(buffer), useSpecialFloats ? "-Infinity" : "-1e+9999");
Expand Down

0 comments on commit 3f0d91f

Please sign in to comment.