mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 06:01:02 +01:00
Merge branch 'fix_loop_counter' of https://github.com/sec65/CyberChef
This commit is contained in:
commit
2f53ee3974
@ -64,6 +64,7 @@ class ConditionalJump extends Operation {
|
||||
jmpIndex = getLabelIndex(label, state);
|
||||
|
||||
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||
state.numJumps = 0;
|
||||
return state;
|
||||
}
|
||||
|
||||
@ -74,6 +75,9 @@ class ConditionalJump extends Operation {
|
||||
state.progress = jmpIndex;
|
||||
state.numJumps++;
|
||||
}
|
||||
else {
|
||||
state.numJumps = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
|
@ -52,6 +52,7 @@ class Jump extends Operation {
|
||||
const jmpIndex = getLabelIndex(label, state);
|
||||
|
||||
if (state.numJumps >= maxJumps || jmpIndex === -1) {
|
||||
state.numJumps = 0;
|
||||
return state;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user