From 6ab35c807b44dcaa70d7f61ac7bdc01f54ac11ab Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Tue, 26 May 2020 21:31:16 +0200 Subject: [PATCH] fix cbz problem when no desc --- src/be/nikiroo/fanfix/supported/Text.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/be/nikiroo/fanfix/supported/Text.java b/src/be/nikiroo/fanfix/supported/Text.java index 252aca0..45d970a 100644 --- a/src/be/nikiroo/fanfix/supported/Text.java +++ b/src/be/nikiroo/fanfix/supported/Text.java @@ -227,9 +227,12 @@ class Text extends BasicSupport { @SuppressWarnings("resource") // cannot close, or we loose getInput()! Scanner scan = new Scanner(getInput(), "UTF-8"); scan.useDelimiter("\\n"); - scan.next(); // title - scan.next(); // author - scan.next(); // date or empty + if (scan.hasNext()) + scan.next(); // title + if (scan.hasNext()) + scan.next(); // author + if (scan.hasNext()) + scan.next(); // date or empty Boolean inChap = null; String line = ""; while (scan.hasNext()) { -- 2.27.0