1
0
forked from GitHub/gf-core

when at EOF don't try to read further

This commit is contained in:
krangelov
2021-10-01 11:57:31 +02:00
parent ad0832903a
commit 0708f6e0cc
2 changed files with 2 additions and 1 deletions

View File

@@ -363,7 +363,6 @@ void PgfExprParser::token()
switch (ch) {
case EOF:
ch = getc();
token_tag = PGF_TOKEN_EOF;
break;
case '(':

View File

@@ -19,6 +19,8 @@ int textcmp(PgfText *t1, PgfText *t2)
PGF_INTERNAL
PgfText* textdup(PgfText *t1)
{
fprintf(stdout,"textdup %s %ld\n", t1->text, t1->size);
fflush(stdout);
size_t size = sizeof(PgfText)+t1->size+1;
PgfText *t2 = (PgfText *) malloc(size);
if (t2 != NULL)