aboutsummaryrefslogtreecommitdiff
path: root/lib/std/json.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-04-28 13:34:38 -0400
committerGitHub <noreply@github.com>2022-04-28 13:34:38 -0400
commit360ecc1a2f72967f3a3882b3327e130bdc4e18c0 (patch)
treec02dfab372e5b79bc2130d666c5e0a0e5cb3af2e /lib/std/json.zig
parentd5fcb509881e1b022d2bcef303b53b4f67db1c9a (diff)
parent11911f55a73a49e2fda85bddd38d1993b93547c9 (diff)
downloadzig-360ecc1a2f72967f3a3882b3327e130bdc4e18c0.tar.gz
zig-360ecc1a2f72967f3a3882b3327e130bdc4e18c0.zip
Merge pull request #11532 from ziglang/compiler-rt-math
compiler-rt math functions reorg
Diffstat (limited to 'lib/std/json.zig')
-rw-r--r--lib/std/json.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/json.zig b/lib/std/json.zig
index c18f38754a..b670e488b2 100644
--- a/lib/std/json.zig
+++ b/lib/std/json.zig
@@ -1655,7 +1655,7 @@ fn parseInternal(
if (numberToken.is_integer)
return try std.fmt.parseInt(T, numberToken.slice(tokens.slice, tokens.i - 1), 10);
const float = try std.fmt.parseFloat(f128, numberToken.slice(tokens.slice, tokens.i - 1));
- if (std.math.round(float) != float) return error.InvalidNumber;
+ if (@round(float) != float) return error.InvalidNumber;
if (float > std.math.maxInt(T) or float < std.math.minInt(T)) return error.Overflow;
return @floatToInt(T, float);
},