Commit 78c98e79 authored by John Ellson's avatar John Ellson

Merge pull request #4 from pixelglow/fix-cascading-fail-on-opening-graph

Fix cascading failure when opening graphs
parents a4c05d20 b699040d
......@@ -142,6 +142,7 @@ int aagparse(void);
void aglexinit(Agdisc_t * disc, void *ifile);
int aaglex(void);
void aglexeof(void);
void aglexbad(void);
/* ID management */
int agmapnametoid(Agraph_t * g, int objtype, char *str,
......
......@@ -580,6 +580,7 @@ Agraph_t *agconcat(Agraph_t *g, void *chan, Agdisc_t *disc)
Disc = (disc? disc : &AgDefaultDisc);
aglexinit(Disc, chan);
yyparse();
if (Ag_G_global == NILgraph) aglexbad();
return Ag_G_global;
}
......
......@@ -211,6 +211,8 @@ void yyerror(char *str)
/* must be here to see flex's macro defns */
void aglexeof() { unput(GRAPH_EOF_TOKEN); }
void aglexbad() { YY_FLUSH_BUFFER; }
#ifndef YY_CALL_ONLY_ARG
# define YY_CALL_ONLY_ARG void
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment