Skip to content

Commit

Permalink
fix: out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
juchaosong committed Aug 20, 2024
1 parent e786109 commit 39f2e92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cmd_utils/upload_utils/heap.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func (h *IntHeap) Pop() any {
}

func (h *IntHeap) Peek() int {
if len(*h) == 0 {
return 0
}
return (*h)[0]
}

Expand Down

0 comments on commit 39f2e92

Please sign in to comment.