Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assembler: fixed bug where relative addressing failed parsing.
  • Loading branch information
icculus committed Aug 1, 2011
1 parent 736d2c6 commit 886eb89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojoshader_assembler.c
Expand Up @@ -427,9 +427,11 @@ static int parse_register_name(Context *ctx, RegisterType *rtype, int *rnum)
// "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)
Expand Down

0 comments on commit 886eb89

Please sign in to comment.