Skip to content

Commit

Permalink
More DCL parsing fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Dec 12, 2008
1 parent a52b6a8 commit 63e810b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions mojoshader_assembler.c
Expand Up @@ -1127,17 +1127,11 @@ static int parse_args_DCL(Context *ctx)
if (nexttoken(ctx, 0, 0, 0, 0) == FAIL)
return FAIL;
else if (strcmp(ctx->token, " ") == 0)
pushback(ctx);
pushback(ctx); // parse_destination_token() wants this.
else if (!ui32fromstr(ctx->token, &index))
return fail(ctx, "Expected usage index or register");

if (nexttoken(ctx, 0, 0, 0, 0) == FAIL)
return FAIL;
else if (strcmp(ctx->token, " ") != 0)
return fail(ctx, "Expected register");
else if (pushback(ctx) == FAIL) // parse_destination_token() wants the ' '
return FAIL;
else if (parse_destination_token(ctx, &ctx->dest_arg) == FAIL)
if (parse_destination_token(ctx, &ctx->dest_arg) == FAIL)
return FAIL;

const int samplerreg = (ctx->dest_arg.regtype == REG_TYPE_SAMPLER);
Expand Down

0 comments on commit 63e810b

Please sign in to comment.