Skip to content

Instantly share code, notes, and snippets.

Created June 20, 2015 03:23
Show Gist options
  • Save anonymous/0afb86e5ece491b220a6 to your computer and use it in GitHub Desktop.
Save anonymous/0afb86e5ece491b220a6 to your computer and use it in GitHub Desktop.
diff --git a/base/string.jl b/base/string.jl
index d7c664d..66d8ced 100644
--- a/base/string.jl
+++ b/base/string.jl
@@ -1555,7 +1555,7 @@ function tryparse_internal{T<:Integer}(::Type{T}, s::AbstractString, startpos::I
end
base = convert(T,base)
- m::T = div(typemax(T)-base+1,base)
+ m::T = T===UInt128 || T===Int128 ? typemax(T) : div(typemax(T)-base+1,base)
n::T = 0
while n <= m
d::T = '0' <= c <= '9' ? c-'0' :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment