Fixed temp count in preshaders.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 02 Jun 2011 03:17:18 -0400
changeset 1050 56b06b1ebb27
parent 1049 ac4c2e745802
child 1051 96a838f4e680
Fixed temp count in preshaders.
mojoshader.c
--- a/mojoshader.c	Thu Jun 02 00:51:50 2011 -0400
+++ b/mojoshader.c	Thu Jun 02 03:17:18 2011 -0400
@@ -7419,8 +7419,8 @@
                 case 7:
                 {
                     operand->type = MOJOSHADER_PRESHADEROPERAND_TEMP;
-                    if (operand->index > preshader->temp_count)
-                        preshader->temp_count = operand->index;
+                    if (operand->index >= preshader->temp_count)
+                        preshader->temp_count = operand->index + 1;
                     break;
                 } // case
             } // switch