diff --git a/lib/hooks/restart.cpp b/lib/hooks/restart.cpp index 2592d51d7..7db41622e 100644 --- a/lib/hooks/restart.cpp +++ b/lib/hooks/restart.cpp @@ -66,13 +66,13 @@ public: if (prev) { /* A wrap around of the sequence no should not be treated as a simulation restart */ - if (smp->sequence == 0 && prev->sequence != 0 && prev->sequence > UINT64_MAX - 16) { + if (smp->sequence == 0 && prev->sequence != 0 && prev->sequence < UINT64_MAX - 16) { logger->warn("Simulation from node {} restarted (previous->sequence={}, current->sequence={})", node_name(node), prev->sequence, smp->sequence); smp->flags |= SAMPLE_IS_FIRST; - /* Run restart hooks */ + /* Restart hooks */ for (size_t i = 0; i < vlist_length(&node->in.hooks); i++) { Hook *k = (Hook *) vlist_at(&node->in.hooks, i);