From 04b4e605a0deaa4dc6f97bb3256f3fa114d9a61f Mon Sep 17 00:00:00 2001 From: Michael Dickens Date: Thu, 13 Feb 2014 12:33:01 -0500 Subject: [PATCH] Removed C99-ism for the sake of OS X 10.6. Fixes #241. --- src/cocoa_window.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index b0f59e90..5a3cfb4c 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -701,13 +701,14 @@ static int translateKey(unsigned int key) { NSEnumerator* e = [files objectEnumerator]; char** names = calloc(count, sizeof(char*)); + int i; - for (int i = 0; i < count; i++) + for (i = 0; i < count; i++) names[i] = strdup([[e nextObject] UTF8String]); _glfwInputDrop(window, count, (const char**) names); - for (int i = 0; i < count; i++) + for (i = 0; i < count; i++) free(names[i]); free(names); }