Skip to content

Commit

Permalink
Fix invalidation with pointer(::String, ::Integer)
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Sep 30, 2020
1 parent 28330a2 commit a0f4c34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/strings/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0f4c34

Please sign in to comment.