on master help sign in
continueAt(0) logic ameliorated
commit62b11fccf4cefb1d284d66d564a2d0ef86b8551c authorMichael James <michael@michaelbjames.com> dateThu 7 Aug 2014, 14:08 (12 years ago) parent0d1c2ab
1 file changed+2−6
runtime/Debugger.js+2−6
runtime/Debugger.js+2−6
@@ -181,8 +181,8 @@ function debugModule(module, runtime) {
181181 eventsUntilSnapshot = EVENTS_PER_SAVE - (position % EVENTS_PER_SAVE);
182182 snapshots = snapshots.slice(0, lastSnapshotPosition + 1);
183183
184− if (position > 0) {
185− var lastEventTime = recordedEvents[position-1].timestep;
184+ if (position < getRecordedEventsLength()) {
185+ var lastEventTime = recordedEvents[position].timestep;
186186 var scrubTime = runtime.timer.now() - lastEventTime;
187187 runtime.timer.addDelay(scrubTime);
188188 }
@@ -251,10 +251,6 @@ function debuggerInit(debugModule, runtime, hotSwapState /* =undefined */) {
251251 function continueProgram() {
252252 if (debugModule.getPaused())
253253 {
254− if (currentEventIndex === 0) {
255− restartProgram();
256− return;
257− }
258254 var closestSnapshotIndex =
259255 Math.floor(currentEventIndex / EVENTS_PER_SAVE) * EVENTS_PER_SAVE;
260256 resetProgram(currentEventIndex);