]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ftepp.c
Some CLZ for other toolchains.
[xonotic/gmqcc.git] / ftepp.c
diff --git a/ftepp.c b/ftepp.c
index c1052def52e627a6d073ab83ed0911073b2ee9fd..8f452754d74b85b3f2787cfba12ee6ddbba112b6 100644 (file)
--- a/ftepp.c
+++ b/ftepp.c
@@ -837,7 +837,7 @@ static bool ftepp_macro_expand(ftepp_t *ftepp, ppmacro *macro, macroparam *param
                         macro_params_find(macro, macro->output[o+1]->value, &pi))
                     {
                         ++o;
-                        
+
                         ftepp_stringify(ftepp, &params[pi]);
                         break;
                     }
@@ -849,10 +849,11 @@ static bool ftepp_macro_expand(ftepp_t *ftepp, ppmacro *macro, macroparam *param
                 break;
             default:
                 buffer = out->value;
-                if (vec_size(macro->output) > o + 1 && macro->output[o+1]->token == '#')
+                #define buffer_stripable(X) ((X) == ' ' || (X) == '\t')
+                if (vec_size(macro->output) > o + 1 && macro->output[o+1]->token == '#' && buffer_stripable(*buffer))
                     buffer++;
                 if (strip) {
-                    while (*buffer == ' ' || *buffer == '\t') buffer++;
+                    while (buffer_stripable(*buffer)) buffer++;
                     strip = false;
                 }
                 ftepp_out(ftepp, buffer, false);