Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed DCL usage index parsing.
"dcl_texcoord_pp" is valid, so we need to see if there's a '_' in there where
 we expect a number might be before parsing for an index value.
  • Loading branch information
icculus committed Feb 12, 2009
1 parent 4c677ed commit 23c7159
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mojoshader_assembler.c
Expand Up @@ -1132,8 +1132,11 @@ static int parse_args_DCL(Context *ctx)

if (parse_dcl_usage(ctx, &usage, &issampler))
{
if ( (ctx->tokenlen > 0) && (!ui32fromtoken(ctx, &index)) )
fail(ctx, "Expected usage index");
if ((ctx->tokenlen > 0) && (*ctx->token != '_'))
{
if (!ui32fromtoken(ctx, &index))
fail(ctx, "Expected usage index");
} // if
} // if

parse_destination_token(ctx);
Expand Down

0 comments on commit 23c7159

Please sign in to comment.