From 5ddfd9f79e6eef0c310e73cf0d1e70950990fc18 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 22 Mar 2022 17:33:08 +0100 Subject: [PATCH] Fix BookReplaceCommand --- src/de/steamwar/tutorial/commands/BookReplaceCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/tutorial/commands/BookReplaceCommand.java b/src/de/steamwar/tutorial/commands/BookReplaceCommand.java index 43b052f..75ca17e 100644 --- a/src/de/steamwar/tutorial/commands/BookReplaceCommand.java +++ b/src/de/steamwar/tutorial/commands/BookReplaceCommand.java @@ -42,7 +42,7 @@ public class BookReplaceCommand extends SWCommand { List stringList = bookMeta.getPages(); for (int i = 0; i < stringList.size(); i++) { String string = stringList.get(i); - stringList.set(i, string.replace(oldChar, newChar)); + bookMeta.setPage(i, string.replace(oldChar, newChar)); } } }