From 243b1bc292a2e3f8c9aee8884574c1c7f4354402 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Thu, 25 Jul 2019 16:55:19 -0500 Subject: [PATCH] Use the correct type in a for loop The `size` member in the `GLFWgammaramp` struct is of type `unsigned int`, so the `for` loop iterating over it should also use the type `unsigned int`. Closes #1541. --- src/cocoa_monitor.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index f1a63e3e..a3458152 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -528,7 +528,7 @@ void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp) CGGammaValue* values = calloc(ramp->size * 3, sizeof(CGGammaValue)); - for (int i = 0; i < ramp->size; i++) + for (unsigned int i = 0; i < ramp->size; i++) { values[i] = ramp->red[i] / 65535.f; values[i + ramp->size] = ramp->green[i] / 65535.f;