From e07eb1a5502721a12346d17bd3f3e7d8630d92d1 Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 23 Mar 2026 20:46:08 +0100 Subject: [PATCH] Fix vision: remove NO_MACRO_CPATH The non-macro q_path() function wrappers in vision.c pass the first two arguments in the wrong order to the _q*_path() functions, swapping rows and columns. This causes the Bresenham line-of-sight code to use column values as row indices into viz_clear_rows[ROWNO], producing out-of-bounds access and infinite loops. NO_MACRO_CPATH selects these broken function wrappers. It was only defined for Amiga (in config1.h), so the bug never triggered on other platforms. Remove the define to use the correct macro versions. --- include/config1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config1.h b/include/config1.h index 3a8632564..402e0e73c 100644 --- a/include/config1.h +++ b/include/config1.h @@ -95,7 +95,7 @@ #undef UNIX #define DLB #define HACKDIR "NetHack:" -#define NO_MACRO_CPATH + #endif /*