Skip to content

Commit b883015

Browse files
committed
minor
1 parent e3353a1 commit b883015

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎v3/js/opt-frontend-common.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,12 @@ function executePythonCode(pythonSourceCode,
121121
}
122122
}
123123
else {
124+
// fail-soft to prevent running off of the end of trace
125+
if (frontendOptionsObj.startingInstruction >= trace.length) {
126+
frontendOptionsObj.startingInstruction = 0;
127+
}
124128
myVisualizer = new ExecutionVisualizer(outputDiv, dataFromBackend, frontendOptionsObj);
125129

126-
127130
// set keyboard bindings
128131
// VERY IMPORTANT to clear and reset this every time or
129132
// else the handlers might be bound multiple times

0 commit comments

Comments
 (0)