From 6c5258fc7f1bcccc3f22c7426887acf0a29df16d Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Tue, 3 Jun 2025 22:15:25 -0700 Subject: [PATCH] Not enough capacity for all Magic tools when ungrouped When "ungroupmagictools" is used, Tux Paint ran out of slots for magic tools. Closes https://sourceforge.net/p/tuxpaint/bugs/299/ h/t Billy A. --- Makefile | 4 ++-- docs/CHANGES.txt | 8 ++++++++ src/org.tuxpaint.Tuxpaint.appdata.xml.in | 4 ++++ src/tuxpaint.c | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 41f36cb45..21c55163f 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,14 @@ # Various contributors (see AUTHORS.txt) # https://tuxpaint.org/ -# June 14, 2002 - May 26, 2025 +# June 14, 2002 - June 3, 2025 # The version number, for release: # (append "-rc#", e.g. "-rc1", when making release candidates # for beta testing) -VER_VERSION:=0.9.35 +VER_VERSION:=0.9.36 # We are always SDL2 now, so don't need "-sdl2" VER_FLAVOR:="" diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 1540212b9..2dc97c9e3 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -6,6 +6,14 @@ Copyright (c) 2002-2025 Various contributors (see below, and AUTHORS.txt) https://tuxpaint.org/ +2025.June.3 (0.9.36) + * Bug Fixes: + ---------- + + When Magic tools are not grouped ("ungroupmagictools"), + the array to hold tools did not have enough capacity. + Closes https://sourceforge.net/p/tuxpaint/bugs/299/ + h/t Billy A. + 2025.May.26 (0.9.35) * New Magic Tools: ---------------- diff --git a/src/org.tuxpaint.Tuxpaint.appdata.xml.in b/src/org.tuxpaint.Tuxpaint.appdata.xml.in index 1fc6186de..5eb72b6c3 100644 --- a/src/org.tuxpaint.Tuxpaint.appdata.xml.in +++ b/src/org.tuxpaint.Tuxpaint.appdata.xml.in @@ -47,6 +47,10 @@ + + +

Bug fixes

+

New Magic tools: "Hearts", "Sparkles", and "Stars".

diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 1740fdcfe..7d5cc48f8 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -1599,8 +1599,9 @@ typedef struct magic_s } magic_t; +/* FIXME: Really both of these should be dynamically allocated -bjk 2025.06.03 */ #define MAX_MAGIC_GROUPS 16 -#define MAX_MAGICS_PER_GROUP 128 +#define MAX_MAGICS_PER_GROUP 256 static int num_plugin_files; /* How many shared object files we went through */ static void *magic_handle[MAX_MAGIC_GROUPS * MAX_MAGICS_PER_GROUP]; /* Handle to shared object (to be unloaded later) *//* FIXME: Unload them! */