From 44c8efc115e969d6ef3bee50aae2136fef83f635 Mon Sep 17 00:00:00 2001 From: dolphin6k Date: Sun, 12 Nov 2023 22:51:21 +0900 Subject: [PATCH] Load plugins only from global plugin directory on Windows. This prevent the crash when "datadir" is set to the program directory. --- src/tuxpaint.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index cc0cb95a8..ffa522203 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -21381,7 +21381,11 @@ static void load_magic_plugins(void) num_magics[i] = 0; num_magics_total = 0; +#ifdef WIN32 + for (plc = 0; plc < MAGIC_PLACE_LOCAL; plc++) +#else for (plc = 0; plc < NUM_MAGIC_PLACES; plc++) +#endif { if (plc == MAGIC_PLACE_GLOBAL) {