Skip to content

Commit

Permalink
Fixed register name parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 12, 2009
1 parent cb80b58 commit 5a6d201
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mojoshader_assembler.c
Expand Up @@ -602,10 +602,11 @@ static int parse_register_name(Context *ctx, RegisterType *rtype, int *rnum)
neednum = 0;
} // else

if (neednum)
// "c[5]" is the same as "c5", so if the token is done, see if next is '['.
if ((neednum) && (ctx->tokenlen == 0))
{
if (nexttoken(ctx) == ((Token) '['))
neednum = 0; // "c[5]" is the same as "c5".
neednum = 0; // don't need a number on register name itself.
pushback(ctx);
} // if

Expand Down

0 comments on commit 5a6d201

Please sign in to comment.