Skip to content

Commit

Permalink
fix: off-by-one menu tree error
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanilves committed Oct 22, 2022
1 parent a86f7f0 commit b5475bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/travelgrunt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func buildMenuFromTree(t tree.Tree) string {
var selected string
var parentID string

for c := -1; c < t.LevelCount()-1; c++ {
for c := -1; c < t.LevelCount(); c++ {
if !t.HasChildren(c, parentID) {
selected = parentID

Expand Down

0 comments on commit b5475bf

Please sign in to comment.