From 71e22f3bfe52a4e33b6a77e860dd6f80f4bb7e53 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Sat, 12 Mar 2022 18:56:46 +0100 Subject: [PATCH] Correct "is this palette empty?" function This notably caused decantation to delete non-empty palettes, which crashes --- src/gfx/pal_packing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx/pal_packing.cpp b/src/gfx/pal_packing.cpp index 70dfdab5..ac5bb0d7 100644 --- a/src/gfx/pal_packing.cpp +++ b/src/gfx/pal_packing.cpp @@ -157,7 +157,7 @@ public: void clear() { _assigned.clear(); } bool empty() const { - return std::find_if_not( + return std::find_if( _assigned.begin(), _assigned.end(), [](std::optional const &slot) { return slot.has_value(); }) == _assigned.end();