From 9c1a4468437671b3c56a7ec201e75ed50fe2ea9d Mon Sep 17 00:00:00 2001 From: Mischanix Date: Tue, 6 Oct 2015 07:22:47 -0500 Subject: [PATCH] Bytecode emit: Don't read starting from the end of the token buffer --- mojoshader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mojoshader.c b/mojoshader.c index 52ba7074..19a2014b 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -1582,7 +1582,7 @@ static void emit_BYTECODE_finalize(Context *ctx) if (set_output(ctx, &ctx->mainline)) { const size_t len = ((size_t) (ctx->tokens - ctx->orig_tokens)) * sizeof (uint32); - buffer_append(ctx->mainline, (const char *) ctx->tokens, len); + buffer_append(ctx->mainline, (const char *) ctx->orig_tokens, len); } // if } // emit_BYTECODE_finalize