Skip to content

Commit

Permalink
Fixed cleanup of Conditionals in pop_source().
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 20, 2009
1 parent 9eb865c commit 0208b08
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mojoshader_preprocessor.c
Expand Up @@ -588,8 +588,13 @@ static void pop_source(Context *ctx)

// state->filename is a pointer to the filename cache; don't free it here!

while (state->conditional_stack)
put_conditional(ctx, state->conditional_stack);
Conditional *cond = state->conditional_stack;
while (cond)
{
Conditional *next = cond->next;
put_conditional(ctx, cond);
cond = next;
} // while

ctx->include_stack = state->next;
put_include(ctx, state);
Expand Down

0 comments on commit 0208b08

Please sign in to comment.