Browse Source

Jump operations now return the final state when the maximum jump count is reached instead of throwing an error.

n1474335 8 years ago
parent
commit
2257754b94
5 changed files with 7 additions and 5 deletions
  1. 0 0
      build/prod/cyberchef.htm
  2. 0 0
      build/prod/index.html
  3. 0 0
      build/prod/scripts.js
  4. 4 2
      src/js/core/FlowControl.js
  5. 3 3
      src/static/stats.txt

File diff suppressed because it is too large
+ 0 - 0
build/prod/cyberchef.htm


File diff suppressed because it is too large
+ 0 - 0
build/prod/index.html


File diff suppressed because it is too large
+ 0 - 0
build/prod/scripts.js


+ 4 - 2
src/js/core/FlowControl.js

@@ -128,7 +128,8 @@ var FlowControl = {
             max_jumps = ings[1];
         
         if (state.num_jumps >= max_jumps) {
-            throw "Reached maximum jumps, sorry!";
+            state.progress++;
+            return state;
         }
         
         state.progress += jump_num;
@@ -155,7 +156,8 @@ var FlowControl = {
             max_jumps = ings[2];
         
         if (state.num_jumps >= max_jumps) {
-            throw "Reached maximum jumps, sorry!";
+            state.progress++;
+            return state;
         }
         
         if (regex_str !== "" && dish.get(Dish.STRING).search(regex_str) > -1) {

+ 3 - 3
src/static/stats.txt

@@ -1,9 +1,9 @@
 206	source files
-113462	lines
+113481	lines
 4.2M	size
 
 137	JavaScript source files
-104304	lines
+104323	lines
 3.7M	size
 
 79	third party JavaScript source files
@@ -11,7 +11,7 @@
 3.0M	size
 
 58	first party JavaScript source files
-19252	lines
+19271	lines
 728K	size
 
 3.4M	uncompressed JavaScript size

Some files were not shown because too many files changed in this diff