From 333c8a06ff0d4c7bf45caf7ea914ec6a8f5220b6 Mon Sep 17 00:00:00 2001 From: Randy McShandy Date: Tue, 12 Dec 2023 22:50:21 -0600 Subject: [PATCH] Fixed an edge case for higher thread counts, but seems we still lock up on big grids (tried 512) --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 574da26..cf979ea 100755 --- a/main.c +++ b/main.c @@ -186,8 +186,8 @@ void* iterator(void* _arg) RD_Opts opts = warg->opts; int start_x = warg->start_x; int start_y = warg->start_y; - int w = warg->width;//(warg->width + start_x >= GRID_X) ? GRID_X-1 - start_x: warg->width; - int h = warg->height;//(warg->height + start_y >= GRID_Y) ? GRID_Y-1 - start_y : warg->height; + int w = (warg->width + start_x >= GRID_X) ? GRID_X-1 - start_x: warg->width; + int h = (warg->height + start_y >= GRID_Y) ? GRID_Y-1 - start_y : warg->height; for (warg->iterations = 0; warg->iterations < warg->max_iterations; warg->iterations++) { -- 2.49.0