mojoshader_effects.c
changeset 1046 097aefb03885
parent 1045 448766b7c981
child 1047 6b92ce2fc809
--- a/mojoshader_effects.c	Wed Jun 01 05:35:50 2011 -0400
+++ b/mojoshader_effects.c	Wed Jun 01 13:22:21 2011 -0400
@@ -34,14 +34,14 @@
 
     for (instit = 0; instit < preshader->instruction_count; instit++, inst++)
     {
-        const MOJOSHADER_preshaderOperand *operand = &inst->operands[1];
+        const MOJOSHADER_preshaderOperand *operand = inst->operands;
         const int isscalar = (inst->opcode >= scalarstart);
         const int elems = inst->element_count;
         const int elemsbytes = sizeof (double) * elems;
 
         // load up our operands...
         int opiter, elemiter;
-        for (opiter = 1; opiter < inst->operand_count; opiter++, operand++)
+        for (opiter = 0; opiter < inst->operand_count-1; opiter++, operand++)
         {
             const unsigned int index = operand->index;
             switch (operand->type)
@@ -164,7 +164,6 @@
         } // switch
 
         // Figure out where dst wants to be stored.
-        operand = inst->operands;
         if (operand->type == MOJOSHADER_PRESHADEROPERAND_TEMP)
             memcpy(temps + operand->index, dst, elemsbytes);
         else