mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 00:42:19 -07:00
correct starting offset
This commit is contained in:
parent
d7b5de9c73
commit
cb52cdd343
1 changed files with 2 additions and 2 deletions
|
|
@ -177,7 +177,7 @@ void ReplayManager::handleSkipEmptySection()
|
||||||
}
|
}
|
||||||
|
|
||||||
// find most recent meaningful event
|
// find most recent meaningful event
|
||||||
int prevEvent = currentEvent;
|
int prevEvent = std::max(0, currentEvent - 1);
|
||||||
for (; prevEvent > 0 && !hasMeaningfulEvent(replay->event_list(prevEvent)); --prevEvent) {
|
for (; prevEvent > 0 && !hasMeaningfulEvent(replay->event_list(prevEvent)); --prevEvent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -187,7 +187,7 @@ void ReplayManager::handleSkipEmptySection()
|
||||||
}
|
}
|
||||||
|
|
||||||
// find next earliest meaningful event
|
// find next earliest meaningful event
|
||||||
int nextEvent = currentEvent + 1;
|
int nextEvent = currentEvent;
|
||||||
for (; nextEvent < replayTimeline.size() - 1 && !hasMeaningfulEvent(replay->event_list(nextEvent)); ++nextEvent) {
|
for (; nextEvent < replayTimeline.size() - 1 && !hasMeaningfulEvent(replay->event_list(nextEvent)); ++nextEvent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue