From c390ebe0c6d7a127faebce2ecb1acb1e4bb2d5ac Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 22 Mar 2024 13:19:56 -0400 Subject: [PATCH] Empty check when reading enum --- src/engine/objects/Item.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Item.java b/src/engine/objects/Item.java index d469d4da..d4e208d0 100644 --- a/src/engine/objects/Item.java +++ b/src/engine/objects/Item.java @@ -153,8 +153,9 @@ public class Item extends AbstractWorldObject { String flagString = rs.getString("item_flags"); - for (String itemFlag : flagString.split(";")) - this.flags.add(Enum.ItemFlags.valueOf(itemFlag)); + if (flagString.isEmpty() == false) + for (String itemFlag : flagString.split(";")) + this.flags.add(Enum.ItemFlags.valueOf(itemFlag)); // Backfill support