From: Niki Roo Date: Tue, 26 May 2020 19:30:04 +0000 (+0200) Subject: fix cbz problem when no desc X-Git-Url: http://git.nikiroo.be/?a=commitdiff_plain;h=26dd35dd37e4193668076d5a1f9f06be5af1b513;p=fanfix-swing.git fix cbz problem when no desc --- diff --git a/src/be/nikiroo/fanfix/supported/Text.java b/src/be/nikiroo/fanfix/supported/Text.java index 252aca04..45d970a6 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()) {