From a87da5debadaeae28d7c1a403050fe36d7bcb73d Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 22 Mar 2022 17:35:37 +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 75ca17e..46f6008 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); - bookMeta.setPage(i, string.replace(oldChar, newChar)); + bookMeta.setPage(i + 1, string.replace(oldChar, newChar)); } } }