mesa: replace assertion with conditional in _mesa_opcode_string()
authorBrian Paul <brianp@vmware.com>
Fri, 3 Apr 2009 15:00:06 +0000 (09:00 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 3 Apr 2009 15:07:04 +0000 (09:07 -0600)
src/mesa/shader/prog_instruction.c

index 6a21152c60be458c7680c9615c038c2ca199eb19..ca7565c091150e48dbb9d652640205ae03d10a90 100644 (file)
@@ -291,7 +291,9 @@ _mesa_is_tex_instruction(gl_inst_opcode opcode)
 const char *
 _mesa_opcode_string(gl_inst_opcode opcode)
 {
-   ASSERT(opcode < MAX_OPCODE);
-   return InstInfo[opcode].Name;
+   if (opcode < MAX_OPCODE)
+      return InstInfo[opcode].Name;
+   else
+      return "OP?";
 }