From 5a2e1cd522c6f0a245cb3c3f9cd4e091a9af8fc7 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jancsika@yahoo.com>
Date: Mon, 15 Sep 2014 20:18:28 -0400
Subject: [PATCH] fixed joc regression with arrays > 2000 elements fixed bug
 with 8x8 click "hotspot" not working correctly on x-axis of garrays

---
 pd/src/g_array.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pd/src/g_array.c b/pd/src/g_array.c
index 6c5ce32ac..e40296597 100644
--- a/pd/src/g_array.c
+++ b/pd/src/g_array.c
@@ -1093,7 +1093,7 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap,
             // all_about_arrays.pd inside custom scalars in an array
             if (pwpix < 8)
                 pwpix = 8;
-            if (xpix >= (int)pxpix1 && xpix <= (int)pxpix2 &&
+            if (xpix >= (int)pxpix1-pwpix && xpix <= (int)pxpix2+pwpix &&
                 ((array_joc) ||
                  (ypix >= pypix-pwpix && ypix <= pypix+pwpix)))
             {
-- 
GitLab