Skip to content

Commit

Permalink
Fix array out of bounds error
Browse files Browse the repository at this point in the history
* NSUInteger -1 is actually a huge positive number
  so testing i >= 0 to end a loop never ends it.
  • Loading branch information
sfsam committed Jan 4, 2021
1 parent ce28511 commit 9885f22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MacVim/MMTabline/MMTabline.m
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ - (void)scrollTabToVisibleAtIndex:(NSUInteger)index
- (void)scrollLeftOneTab
{
NSRect clipBounds = _scrollView.contentView.bounds;
for (NSUInteger i = _tabs.count - 1; i >= 0; i--) {
for (NSInteger i = _tabs.count - 1; i >= 0; i--) {
NSRect tabFrame = _tabs[i].frame;
if (!NSContainsRect(clipBounds, tabFrame)) {
if (NSMinX(tabFrame) < NSMinX(clipBounds)) {
Expand Down

0 comments on commit 9885f22

Please sign in to comment.