From 23c7159d68611ac5885f4f8c08dd54fd851a515b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 12 Feb 2009 02:03:18 -0500 Subject: [PATCH] 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. --- mojoshader_assembler.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mojoshader_assembler.c b/mojoshader_assembler.c index a5f5e377..d60669d4 100644 --- a/mojoshader_assembler.c +++ b/mojoshader_assembler.c @@ -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);