From 6673a5f73c0484f8462b4b33860d2b1c68c24684 Mon Sep 17 00:00:00 2001 From: Tom M Date: Sun, 14 Mar 2021 20:23:38 +0100 Subject: [PATCH] Update fluid_sffile.c --- src/sfloader/fluid_defsfont.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/sfloader/fluid_defsfont.c b/src/sfloader/fluid_defsfont.c index fc68d34..9663a40 100644 --- a/src/sfloader/fluid_defsfont.c +++ b/src/sfloader/fluid_defsfont.c @@ -2829,13 +2829,14 @@ load_pgen (int size, SFData * sf, FILE * fd) } else { - SFZone * pzone = fluid_list_get(p2); + p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */ /* previous global zone exists, discard */ FLUID_LOG (FLUID_WARN, _("Preset \"%s\": Discarding invalid global zone"), ((SFPreset *) (p->data))->name); - *hz = fluid_list_remove(start_of_zone_list, pzone); - sfont_free_zone(pzone); + fluid_list_remove(start_of_zone_list, z); + sfont_free_zone(z); + continue; } } @@ -3182,13 +3183,14 @@ load_igen (int size, SFData * sf, FILE * fd) } else { - SFZone * izone = fluid_list_get(p2); + p2 = fluid_list_next(p2); /* advance to next zone before deleting the current list element */ /* previous global zone exists, discard */ FLUID_LOG (FLUID_WARN, _("Instrument \"%s\": Discarding invalid global zone"), ((SFInst *) (p->data))->name); - *hz = fluid_list_remove(start_of_zone_list, izone); - sfont_free_zone(izone); + fluid_list_remove(start_of_zone_list, z); + sfont_free_zone(z); + continue; } } -- 2.23.0