mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 15:26:16 -04:00
add other flowcontrol ops. Update tests
This commit is contained in:
parent
046e1ebad9
commit
8ff6596657
15 changed files with 735 additions and 402 deletions
|
@ -50,13 +50,11 @@ class Jump extends Operation {
|
|||
const jmpIndex = getLabelIndex(label, state);
|
||||
|
||||
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||
log.debug("Maximum jumps reached or label cannot be found");
|
||||
return state;
|
||||
}
|
||||
|
||||
state.progress = jmpIndex;
|
||||
state.numJumps++;
|
||||
log.debug(`Jumping to label '${label}' at position ${jmpIndex} (jumps = ${state.numJumps})`);
|
||||
return state;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue