diff --git a/base/strings/string.jl b/base/strings/string.jl index 1ebb85ff78dd2..a5a1c887272c2 100644 --- a/base/strings/string.jl +++ b/base/strings/string.jl @@ -92,7 +92,7 @@ String(s::CodeUnits{UInt8,String}) = s.s ## low-level functions ## pointer(s::String) = unsafe_convert(Ptr{UInt8}, s) -pointer(s::String, i::Integer) = pointer(s)+(i-1) +pointer(s::String, i::Integer) = pointer(s) + Int(i)::Int - 1 @pure ncodeunits(s::String) = Core.sizeof(s) codeunit(s::String) = UInt8