Skip to content

Commit ee97085

Browse files
committed
ControlBlocks: Fix assertions
1 parent a4168c0 commit ee97085

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/blocks/controlblocks.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ unsigned int ControlBlocks::stopOtherScriptsInSprite(VirtualMachine *vm)
147147
unsigned int ControlBlocks::startWait(VirtualMachine *vm)
148148
{
149149
auto currentTime = std::chrono::steady_clock::now();
150-
assert(m_startTimeMap.count(vm) == 0);
150+
assert(m_timeMap.count(vm) == 0);
151151
m_timeMap[vm] = { currentTime, vm->getInput(0, 1)->toDouble() * 1000 };
152152
return 1;
153153
}
154154

155155
unsigned int ControlBlocks::wait(VirtualMachine *vm)
156156
{
157157
auto currentTime = std::chrono::steady_clock::now();
158-
assert(m_startTimeMap.count(vm) == 1);
158+
assert(m_timeMap.count(vm) == 1);
159159
if (std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - m_timeMap[vm].first).count() >= m_timeMap[vm].second) {
160160
m_timeMap.erase(vm);
161161
vm->stop(true, true, false);

0 commit comments

Comments
 (0)