From 9643c53990af94e15185e14abd324cbb5b3cf74b Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 10 Jun 2018 01:27:49 +0300 Subject: [PATCH] * picomodel: fix parser->curLine for line number report (was increased twice) --- libs/picomodel/picointernal.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libs/picomodel/picointernal.c b/libs/picomodel/picointernal.c index 21b07415..8fdbcc39 100644 --- a/libs/picomodel/picointernal.c +++ b/libs/picomodel/picointernal.c @@ -37,12 +37,6 @@ /* marker */ #define PICOINTERNAL_C - - -/* todo: - * - fix p->curLine for parser routines. increased twice - */ - /* dependencies */ #include #include "picointernal.h" @@ -825,6 +819,7 @@ int _pico_parse_ex( picoParser_t *p, int allowLFs, int handleQuoted ){ /* return if we're not allowed to go beyond lfs */ if ( ( hasLFs > 0 ) && !allowLFs ) { p->cursor = old; + p->curLine -= hasLFs; return 0; } /* get next quoted string */