Skip to content

Commit

Permalink
Don't replace macros with args until later in preprocessing.
Browse files Browse the repository at this point in the history
Fixes unit_tests/preprocessor/output/macro-with-arg-as-macro-arg ...
  • Loading branch information
icculus committed Mar 12, 2010
1 parent 44e4c99 commit a5d1a76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mojoshader_preprocessor.c
Expand Up @@ -1503,7 +1503,8 @@ static int handle_macro_args(Context *ctx, const char *sym, const Define *def)
else if (t == TOKEN_IDENTIFIER)
{
const Define *def = find_define_by_token(ctx);
if (def)
// don't replace macros with arguments so they replace correctly, later.
if ((def) && (def->paramcount == 0))
{
expr = def->definition;
exprlen = strlen(def->definition);
Expand Down

0 comments on commit a5d1a76

Please sign in to comment.