forked from GitHub/gf-core
when at EOF don't try to read further
This commit is contained in:
@@ -363,7 +363,6 @@ void PgfExprParser::token()
|
|||||||
|
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case EOF:
|
case EOF:
|
||||||
ch = getc();
|
|
||||||
token_tag = PGF_TOKEN_EOF;
|
token_tag = PGF_TOKEN_EOF;
|
||||||
break;
|
break;
|
||||||
case '(':
|
case '(':
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ int textcmp(PgfText *t1, PgfText *t2)
|
|||||||
PGF_INTERNAL
|
PGF_INTERNAL
|
||||||
PgfText* textdup(PgfText *t1)
|
PgfText* textdup(PgfText *t1)
|
||||||
{
|
{
|
||||||
|
fprintf(stdout,"textdup %s %ld\n", t1->text, t1->size);
|
||||||
|
fflush(stdout);
|
||||||
size_t size = sizeof(PgfText)+t1->size+1;
|
size_t size = sizeof(PgfText)+t1->size+1;
|
||||||
PgfText *t2 = (PgfText *) malloc(size);
|
PgfText *t2 = (PgfText *) malloc(size);
|
||||||
if (t2 != NULL)
|
if (t2 != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user