Skip to content

Commit 479d25d

Browse files
author
Ben Baumgold
committedMar 28, 2021
#70 prevent overflow
1 parent 8b00d7d commit 479d25d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/TableView.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,11 @@ function _showtable_async!(w, schema, names, types, rows, coldefs, tablelength,
259259
end
260260

261261
function _is_javascript_safe(x::Integer)
262-
-Int128(2^53)-1 < x < Int128(2^53)-1
262+
-(Int64(2)^53-1) < x < Int64(2)^53-1
263263
end
264264

265265
function _is_javascript_safe(x::AbstractFloat)
266-
-2^53-1 < x < 2^53-1
266+
-(Float64(2)^53-1) < x < Float64(2)^53-1
267267
end
268268

269269
# directly write JSON instead of allocating temporary dicts etc

0 commit comments

Comments
 (0)