From fdcb89a8a784626edcc400478edeff69117e3f3c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 10 Feb 2009 17:29:36 -0500 Subject: [PATCH] Preprocessor should return TOKEN_EOI when we finish the whole include stack. --- mojoshader_preprocessor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mojoshader_preprocessor.c b/mojoshader_preprocessor.c index 3aeb1b26..62a82ea5 100644 --- a/mojoshader_preprocessor.c +++ b/mojoshader_preprocessor.c @@ -333,7 +333,11 @@ const char *preprocessor_nexttoken(Preprocessor *_ctx, unsigned int *_len, { IncludeState *state = ctx->include_stack; if (state == NULL) + { + *_token = TOKEN_EOI; + *_len = 0; return NULL; // we're done! + } // if if (state->insert_token != TOKEN_UNKNOWN) {