Skip to content

Commit

Permalink
guard against negative arguments to scroll-line-location
Browse files Browse the repository at this point in the history
  • Loading branch information
rfindler committed Jan 5, 2024
1 parent ec5d8ce commit 8109de9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gui-lib/mred/private/wxme/text.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@
(let* ([newtop (find-scroll-line (+ vy scroll-height))]
[y (scroll-line-location (+ newtop 1))]
[newtop (if (y . > . (+ vy scroll-height))
(sub1 newtop)
(max 0 (sub1 newtop))
newtop)]
[y (scroll-line-location newtop)])
;; y is the new top location
Expand Down

0 comments on commit 8109de9

Please sign in to comment.