From 06a4afd7de8a22bd56531c552d168acd02898fe4 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 27 Feb 2011 21:42:41 +0100 Subject: [PATCH] Fixed loop termination bug. --- src/cocoa/cocoa_fullscreen.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa/cocoa_fullscreen.m b/src/cocoa/cocoa_fullscreen.m index 95bd8538..8d23f057 100644 --- a/src/cocoa/cocoa_fullscreen.m +++ b/src/cocoa/cocoa_fullscreen.m @@ -83,7 +83,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount) NSArray* modes = (NSArray*) CGDisplayAvailableModes(CGMainDisplayID()); unsigned int i, j = 0, n = [modes count]; - for (i = 0; i < n && i < (unsigned)maxcount; i++) + for (i = 0; i < n && j < (unsigned)maxcount; i++) { NSDictionary *mode = [modes objectAtIndex:i]; if (modeIsGood(mode))