* picomodel: fix parser->curLine for line number report (was increased twice)

This commit is contained in:
Garux 2018-06-10 01:27:49 +03:00
parent b12ecc838b
commit 9643c53990

View File

@ -37,12 +37,6 @@
/* marker */ /* marker */
#define PICOINTERNAL_C #define PICOINTERNAL_C
/* todo:
* - fix p->curLine for parser routines. increased twice
*/
/* dependencies */ /* dependencies */
#include <string.h> #include <string.h>
#include "picointernal.h" #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 */ /* return if we're not allowed to go beyond lfs */
if ( ( hasLFs > 0 ) && !allowLFs ) { if ( ( hasLFs > 0 ) && !allowLFs ) {
p->cursor = old; p->cursor = old;
p->curLine -= hasLFs;
return 0; return 0;
} }
/* get next quoted string */ /* get next quoted string */