Skip to content

Commit

Permalink
Profile: fix indent computation BoundsError (JuliaLang#34806)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Feb 19, 2020
1 parent 8720530 commit f5afdf9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/Profile/src/Profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,9 @@ function indent(depth::Int)
depth < 1 && return ""
depth <= length(indent_z) && return indent_s[1:indent_z[depth]]
div, rem = divrem(depth, length(indent_z))
return (indent_s^div) * SubString(indent_s, 1, indent_z[rem])
indent = indent_s^div
rem != 0 && (indent *= SubString(indent_s, 1, indent_z[rem]))
return indent
end

function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, maxes, filenamemap::Dict{Symbol,String}, showpointer::Bool)
Expand Down

0 comments on commit f5afdf9

Please sign in to comment.