Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / src / surf / trace_mgr.c
index 5b45dab..3ce034e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004, 2005, 2007, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2004-2005, 2007, 2009-2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -444,7 +444,7 @@ tmgr_trace_event_t tmgr_history_get_next_event_leq(tmgr_history_t h,
         trace_event->idx++;
       } else if (event->delta > 0) {        /* Last element, checking for periodicity */
         xbt_heap_push(h->heap, trace_event, event_date + event->delta);
-        trace_event->idx = 0;
+        trace_event->idx = 1; /* not 0 as the first event is a placeholder to handle when events really start */
       } else {                      /* We don't need this trace_event anymore */
         trace_event->free_me = 1;
       }