diff options
| author | Matthijs Bijman <matthijs@bijman.org> | 2017-02-27 15:33:48 +0100 |
|---|---|---|
| committer | Matthijs Bijman <matthijs@bijman.org> | 2017-02-27 15:33:48 +0100 |
| commit | f563b9c9a05b3e47070bfa4775a0e18ace8797a6 (patch) | |
| tree | 479eaec78e76babfeaa99ad7d41e265e2f03d5d3 /Simulator/src/database | |
| parent | 34aaaad34e72c921ea72d7b023e5a5270e76dd40 (diff) | |
Experiments are now finished if no machines are present
Diffstat (limited to 'Simulator/src/database')
| -rw-r--r-- | Simulator/src/database/Database.cpp | 2 |
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()) |
