tgsi: Fix instruction opcode parsing.
authorMichal Krol <michal@tungstengraphics.com>
Sun, 13 Jul 2008 09:43:30 +0000 (11:43 +0200)
committerMichal Krol <michal@tungstengraphics.com>
Sun, 13 Jul 2008 11:17:37 +0000 (13:17 +0200)
src/gallium/auxiliary/tgsi/util/tgsi_text.c

index 3415b38f9c6b78593eff3b842bf7f23e53571cc5..7848f3d55f2a62856cb3ccadd3ebce95879671ee 100644 (file)
@@ -541,7 +541,7 @@ static boolean parse_instruction( struct translate_ctx *ctx )
 
       if (str_match_no_case( &cur, opcode_info[i].mnemonic )) {
          /* TODO: _SAT suffix */
-         if (eat_white( &cur )) {
+         if (*cur == '\0' || eat_white( &cur )) {
             ctx->cur = cur;
             break;
          }