mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Jump operations now return the final state when the maximum jump count is reached instead of throwing an error.
This commit is contained in:
parent
baa433ab80
commit
2257754b94
5 changed files with 22 additions and 20 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue