Skip to content

Commit 9d71363

Browse files
authored
fix string indexing logic error in showing types in backtrace (#38469)
1 parent 0f7a654 commit 9d71363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2184,7 +2184,7 @@ function print_type_stacktrace(io, type; color=:normal)
21842184
if isnothing(i) || !get(io, :backtrace, false)::Bool
21852185
printstyled(io, str; color=color)
21862186
else
2187-
printstyled(io, str[1:i-1]; color=color)
2187+
printstyled(io, str[1:prevind(str,i)]; color=color)
21882188
printstyled(io, str[i:end]; color=:light_black)
21892189
end
21902190
end

0 commit comments

Comments
 (0)