Skip to content

Instantly share code, notes, and snippets.

@tkelman
Created July 11, 2015 19:17
Show Gist options
  • Save tkelman/c9543a055f60addaa9be to your computer and use it in GitHub Desktop.
Save tkelman/c9543a055f60addaa9be to your computer and use it in GitHub Desktop.
diff --git a/base/parse.jl b/base/parse.jl
index d7c664d..66d8ced 100644
--- a/base/parse.jl
+++ b/base/parse.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