From 82dc90c713128fa26beb360c3327869a9e4eaf94 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 30 Apr 2026 22:59:07 -0700 Subject: [PATCH] newsym() impossible() band-aid Prevent the main vision_recalc loop from triggering an impossible for bad coordinates from newsym(). This hack may mean that the underlying problem will remain unsolved but at least newsym won't cause the fuzzer to panic or frighten players with impossible warnings. --- src/vision.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vision.c b/src/vision.c index 90bd965a9..ce293ade4 100644 --- a/src/vision.c +++ b/src/vision.c @@ -822,7 +822,18 @@ vision_recalc(int control) if ((old_row[col] & IN_SIGHT) || ((next_row[col] & COULD_SEE) ^ (old_row[col] & COULD_SEE))) + { + /* + * TEMPORARY? Sometimes we get here with col==0 and + * newsym()'s impossible() for !isok() is being + * triggered, so avoid calling it for <0,y>; other bad + * coordinates will produce a panic() as they should. + */ + if (col != 0) + /* + */ newsym(col, row); + } } } /* end for col . . */