]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
linecounting issues in the ftepp
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 15:08:41 +0000 (16:08 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 15:08:41 +0000 (16:08 +0100)
ftepp.c

diff --git a/ftepp.c b/ftepp.c
index 1e45de9c6c3a0169deb92b52af0f9c7cd9739f4b..d6cdb3de37f06578dc0730b5c3a561d4623aae58 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -295,6 +295,7 @@ static bool ftepp_define_params(ftepp_t *ftepp, ppmacro *macro)
 static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
 {
     pptoken *ptok;
+    size_t l = ftepp_ctx(ftepp).line;
     while (ftepp->token != TOKEN_EOL && ftepp->token < TOKEN_EOF) {
         ptok = pptoken_make(ftepp);
         vec_push(macro->output, ptok);
@@ -305,6 +306,8 @@ static bool ftepp_define_body(ftepp_t *ftepp, ppmacro *macro)
         ftepp_error(ftepp, "unexpected junk after macro or unexpected end of file");
         return false;
     }
+    for (; l < ftepp_ctx(ftepp).line; ++l)
+        ftepp_out(ftepp, "\n", true);
     return true;
 }