From 79bb675c9425cad5dfff0207e744c1c9348037bb Mon Sep 17 00:00:00 2001 From: Christos Choutouridis Date: Sat, 24 Oct 2020 22:23:40 +0300 Subject: [PATCH] FIX: Range get stoped use exception as termination case sentinel --- src/net/hoo2/auth/labyrinth/Common.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/net/hoo2/auth/labyrinth/Common.java b/src/net/hoo2/auth/labyrinth/Common.java index 673f757..794aec6 100644 --- a/src/net/hoo2/auth/labyrinth/Common.java +++ b/src/net/hoo2/auth/labyrinth/Common.java @@ -172,12 +172,9 @@ class Range { * @return The first item of the range or Const.noTileId if there is none. */ int get () { - try { + if (!numbers.isEmpty()) return numbers.remove(0); - } - catch (IndexOutOfBoundsException e) { - return Const.noTileId; - } + return Const.noTileId; } /** @name protected data types */