Skip to content

Commit

Permalink
Preprocessor: Don't push predefined macro null terminator to the incl…
Browse files Browse the repository at this point in the history
…ude stack.
  • Loading branch information
icculus committed Nov 15, 2010
1 parent f5d97c8 commit eabc718
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mojoshader_preprocessor.c
Expand Up @@ -665,10 +665,11 @@ Preprocessor *preprocessor_start(const char *fname, const char *source,
if ((okay) && (!push_source(ctx,fname,source,sourcelen,1,NULL)))
okay = 0;

if ((okay) && (define_include != NULL))
if ((okay) && (define_include_len > 0))
{
assert(define_include != NULL);
okay = push_source(ctx, "<predefined macros>", define_include,
define_include_len, 1, close_define_include);
define_include_len-1, 1, close_define_include);
} // if

if (!okay)
Expand Down

0 comments on commit eabc718

Please sign in to comment.