Browse Source

(palxex) autoscript instrument 06 bugfix

When target is ZERO, it just stay one cycle
louyihua 8 years ago
parent
commit
8a55049a29
1 changed files with 6 additions and 3 deletions
  1. 6 3
      script.c

+ 6 - 3
script.c

@@ -3442,10 +3442,13 @@ begin:
       //
       // jump to the specified address by the specified rate
       //
-      if (RandomLong(1, 100) >= pScript->rgwOperand[0] && pScript->rgwOperand[1] != 0)
+      if (RandomLong(1, 100) >= pScript->rgwOperand[0])
       {
-         wScriptEntry = pScript->rgwOperand[1];
-         goto begin;
+         if (pScript->rgwOperand[1] != 0)
+		 {
+            wScriptEntry = pScript->rgwOperand[1];
+            goto begin;
+		 }
       }
       else
       {