fixed: JSONToSpaceParser incorrectly read the last character from an UTF8 string (a last character before terminating zero char)

it caused a syntax error when parsing



git-svn-id: svn://ttmath.org/publicrep/pikotools/trunk@1101 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2018-04-26 16:36:15 +00:00
parent dd325bd4f9
commit 72a510ce71
1 changed files with 3 additions and 5 deletions

View File

@ -737,13 +737,11 @@ bool correct;
{
size_t len = PT::UTF8ToInt(pchar_ascii, c, correct);
pchar_ascii += len;
if( *pchar_ascii == 0 )
return lastc;
}
while( !correct );
while( *pchar_ascii && !correct );
lastc = c;
if( correct )
lastc = c;
if( lastc == '\n' )
++line;