diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index 299d7d53..6ffa0f17 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -4,6 +4,9 @@ * src/cmd/cmd_debug.c: Add a completion handler. + * src/global/parse.c (urj_parse_stream): Do not call "quit" when we hit the + end of a stream. Simply return success so we can handle nested cases. + 2011-02-21 Mike Frysinger * data/Makefile.am (nobase_dist_pkgdata_DATA): Add missing analog/bfin/bfin. diff --git a/urjtag/src/global/parse.c b/urjtag/src/global/parse.c index b7d2714f..a9680ab7 100644 --- a/urjtag/src/global/parse.c +++ b/urjtag/src/global/parse.c @@ -231,9 +231,11 @@ urj_parse_stream (urj_log_level_t ll, urj_chain_t *chain, FILE *f) break; } - /* Make sure inputline is big enough ... don't rely on getline */ - inputline = realloc (inputline, 5); - sprintf (inputline, "quit"); + /* If we hit the end of the file, just return. Do not + * "quit" or fail as this will break things like nested + * file includes. */ + go = URJ_STATUS_OK; + break; } else {