Skip to content

Commit 9885f22

Browse files
committed
Fix array out of bounds error
* NSUInteger -1 is actually a huge positive number so testing i >= 0 to end a loop never ends it.
1 parent ce28511 commit 9885f22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/MacVim/MMTabline/MMTabline.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ - (void)scrollTabToVisibleAtIndex:(NSUInteger)index
530530
- (void)scrollLeftOneTab
531531
{
532532
NSRect clipBounds = _scrollView.contentView.bounds;
533-
for (NSUInteger i = _tabs.count - 1; i >= 0; i--) {
533+
for (NSInteger i = _tabs.count - 1; i >= 0; i--) {
534534
NSRect tabFrame = _tabs[i].frame;
535535
if (!NSContainsRect(clipBounds, tabFrame)) {
536536
if (NSMinX(tabFrame) < NSMinX(clipBounds)) {

0 commit comments

Comments
 (0)