浏览代码

(palxex) autoscript instrument 06 bugfix

When target is ZERO, it just stay one cycle
louyihua 8 年之前
父节点
当前提交
8a55049a29
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      script.c

+ 6 - 3
script.c

@@ -3442,10 +3442,13 @@ begin:
       //
       //
       // jump to the specified address by the specified rate
       // 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
       else
       {
       {