From 5aecbb0ee61d20b9b2d329720845460e58c8a9d1 Mon Sep 17 00:00:00 2001 From: Casey Banner Date: Wed, 1 Mar 2023 20:32:21 -0500 Subject: [PATCH] glfw: update to new for loop syntax (#711) --- libs/glfw/src/Window.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/glfw/src/Window.zig b/libs/glfw/src/Window.zig index 61cad782..a2bb9eb7 100644 --- a/libs/glfw/src/Window.zig +++ b/libs/glfw/src/Window.zig @@ -488,7 +488,7 @@ pub inline fn setIcon(self: Window, allocator: mem.Allocator, images: ?[]Image) if (images) |im| { const tmp = try allocator.alloc(c.GLFWimage, im.len); defer allocator.free(tmp); - for (im) |img, index| tmp[index] = img.toC(); + for (im, 0..) |img, index| tmp[index] = img.toC(); c.glfwSetWindowIcon(self.handle, @intCast(c_int, im.len), &tmp[0]); } else c.glfwSetWindowIcon(self.handle, 0, null); }