update old_string on failure in ftepp_macro_expand to not segfault on a preprocessor...
authorWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 09:44:39 +0000 (10:44 +0100)
committerWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 09:44:39 +0000 (10:44 +0100)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index 21669a8aa6a492910c23b12dcb3d8482c4fb09a8..d9197e5ec9a6150f1b362f0c1bc256b32d515258 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -652,6 +652,7 @@ static bool ftepp_macro_expand(ftepp_t *ftepp, ppmacro *macro, macroparam *param
     ftepp->lex = inlex;
     ftepp_recursion_header(ftepp);
     if (!ftepp_preprocess(ftepp)) {
+        old_string = ftepp->output_string;
         lex_close(ftepp->lex);
         retval = false;
         goto cleanup;