summaryrefslogtreecommitdiff
path: root/Simulator/src
diff options
context:
space:
mode:
Diffstat (limited to 'Simulator/src')
-rw-r--r--Simulator/src/database/Database.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Simulator/src/database/Database.cpp b/Simulator/src/database/Database.cpp
index d1bb2af5..f9ef6f7e 100644
--- a/Simulator/src/database/Database.cpp
+++ b/Simulator/src/database/Database.cpp
@@ -78,7 +78,7 @@ namespace Database
history.clearHistory();
- uint32_t lastSimulatedTick = experiment.getCurrentTick() - 1;
+ uint32_t lastSimulatedTick = experiment.getCurrentTick() != 0 ? experiment.getCurrentTick() - 1 : 0;
QueryExecuter<> writeLastSimulatedTick(db);
writeLastSimulatedTick.setQuery(Queries::WRITE_EXPERIMENT_LAST_SIMULATED_TICK)
.bindParams<int, int>(lastSimulatedTick, experiment.getId())