From e38b2c05a9c8aa81d1c5906c4a1be8864e0b9c96 Mon Sep 17 00:00:00 2001 From: Hiraoka Date: Wed, 1 Sep 2021 19:01:35 +0900 Subject: [PATCH] Fix IndexOutOfBoundsException by Settings > Engine > OK without config.txt --- src/main/java/featurecat/lizzie/analysis/EngineManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/featurecat/lizzie/analysis/EngineManager.java b/src/main/java/featurecat/lizzie/analysis/EngineManager.java index 3d93fb959..a5a74a5ee 100644 --- a/src/main/java/featurecat/lizzie/analysis/EngineManager.java +++ b/src/main/java/featurecat/lizzie/analysis/EngineManager.java @@ -172,6 +172,9 @@ public void refresh() throws JSONException, IOException { i -> { String cmd = m.optString(i); int index = i + 1; + while (engineList.size() < index + 1) { + engineList.add(null); + } if (index != currentEngineNo) { updateEngine( index,