# HG changeset patch # User Ryan C. Gordon # Date 1312225612 14400 # Node ID 4c5cb78c6cdd36551e344666bf23a0e575c959d4 # Parent 73c697a7e9504cf91406fa98b7ecc3520600ce0b Assembler: fixed bug where relative addressing failed parsing. diff -r 73c697a7e950 -r 4c5cb78c6cdd mojoshader_assembler.c --- a/mojoshader_assembler.c Mon Jun 20 15:56:22 2011 -0400 +++ b/mojoshader_assembler.c Mon Aug 01 15:06:52 2011 -0400 @@ -427,9 +427,11 @@ // "c[5]" is the same as "c5", so if the token is done, see if next is '['. if ((neednum) && (ctx->tokenlen == 0)) { + const int tlen = ctx->tokenlen; // we need to protect this for later. if (nexttoken(ctx) == ((Token) '[')) neednum = 0; // don't need a number on register name itself. pushback(ctx); + ctx->tokenlen = tlen; } // if if (neednum)