Browse Source

Empty check when reading enum

combat-2
MagicBot 8 months ago
parent
commit
c390ebe0c6
  1. 5
      src/engine/objects/Item.java

5
src/engine/objects/Item.java

@ -153,8 +153,9 @@ public class Item extends AbstractWorldObject { @@ -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

Loading…
Cancel
Save