From 173489b5c7e8278775dab946c76a107a6bd0a130 Mon Sep 17 00:00:00 2001 From: Coues Ludovic Date: Fri, 8 Nov 2013 22:23:53 +0100 Subject: [PATCH] Fix the for loop --- cursor/parse_cursor_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cursor/parse_cursor_file.c b/cursor/parse_cursor_file.c index b944c4a..7b32f42 100644 --- a/cursor/parse_cursor_file.c +++ b/cursor/parse_cursor_file.c @@ -135,7 +135,7 @@ int parse_cursor_file(xcb_cursor_context_t *c, const int fd, xcint_image_t **ima if ((*images = calloc(nsizes, sizeof(xcint_image_t))) == NULL) goto error; - for (int n = 0; n < cf.header.ntoc; n++) { + for (int n = 0; n < nsizes; n++) { xcint_chunk_header_t chunk; /* for convenience */ xcint_image_t *i = &((*images)[n]); -- 1.8.4.2