Skip to content

Commit

Permalink
Prevent String mutating buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Oct 26, 2024
1 parent f3d722d commit b1f6471
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/floats.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function typeparser(::AbstractConf{BigFloat}, source, pos, len, b, code, pl, opt
readbytes!(source, str, vlen)
fastseek!(source, _pos) # reset IO to earlier position
end
str = Base.cconvert(Cstring, String(str))
str = Base.cconvert(Cstring, String(copy(str)))
GC.@preserve str begin
ptr = pointer(str, strpos)
endptr = Ref{Ptr{UInt8}}()
Expand Down

0 comments on commit b1f6471

Please sign in to comment.