From 60a6880131972f7cd41dfe85ece4870948624004 Mon Sep 17 00:00:00 2001 From: Frank Ueberschar Date: Mon, 24 Aug 2020 13:47:56 +0200 Subject: [PATCH] configparser: convert end of line to representation of parser --- core/src/lib/lex.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/lib/lex.cc b/core/src/lib/lex.cc index 58c689488ba..1af86e51f3f 100644 --- a/core/src/lib/lex.cc +++ b/core/src/lib/lex.cc @@ -3,7 +3,7 @@ Copyright (C) 2000-2012 Free Software Foundation Europe e.V. Copyright (C) 2011-2012 Planets Communications B.V. - Copyright (C) 2013-2016 Bareos GmbH & Co. KG + Copyright (C) 2013-2020 Bareos GmbH & Co. KG This program is Free Software; you can redistribute it and/or modify it under the terms of version three of the GNU Affero General Public @@ -389,6 +389,9 @@ int LexGetChar(LEX* lf) lf->ch = (uint8_t)lf->line[lf->col_no]; if (lf->ch == 0) { lf->ch = L_EOL; + } else if (lf->ch == '\n') { + lf->ch = L_EOL; + lf->col_no++; } else { lf->col_no++; }