Skip to content

Commit

Permalink
fix string indexing logic error in showing types in backtrace (JuliaL…
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Nov 19, 2020
1 parent 0f7a654 commit 9d71363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ function print_type_stacktrace(io, type; color=:normal)
if isnothing(i) || !get(io, :backtrace, false)::Bool
printstyled(io, str; color=color)
else
printstyled(io, str[1:i-1]; color=color)
printstyled(io, str[1:prevind(str,i)]; color=color)
printstyled(io, str[i:end]; color=:light_black)
end
end
Expand Down

0 comments on commit 9d71363

Please sign in to comment.