From: Randy McShandy Date: Wed, 13 Dec 2023 04:50:21 +0000 (-0600) Subject: Fixed an edge case for higher thread counts, but seems we still lock up on big grids... X-Git-Url: http://git.mcshandy.xyz/gitweb.cgi?a=commitdiff_plain;h=333c8a06ff0d4c7bf45caf7ea914ec6a8f5220b6;p=barrow_crawler Fixed an edge case for higher thread counts, but seems we still lock up on big grids (tried 512) --- 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++) {