You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// JSON does not support NaN or Infinity, so use extremely large numbers for infinity.
80
+
if (!Math::is_finite(num)) {
81
+
if (num == Math::INF) {
82
+
r_result += "1e99999";
83
+
} elseif (num == -Math::INF) {
84
+
r_result += "-1e99999";
85
+
} else {
86
+
WARN_PRINT_ONCE("`NaN` (\"Not a Number\") found in argument passed to JSON.stringify(). `NaN` cannot be represented in JSON, so the value has been replaced with `null`. This warning will not be printed for any later NaN occurrences.");
87
+
r_result += "null";
88
+
}
89
+
return;
90
+
}
79
91
// Only for exactly 0. If we have approximately 0 let the user decide how much
ERR_FAIL_COND_V_MSG(path.is_empty(), ERR_INVALID_PARAMETER, "Can't save resource to empty path. Provide non-empty path or a Resource with non-empty resource_path.");
0 commit comments