Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix binary search removal in ObjectInformation::remove_global_variable()
[simgrid.git] / src / mc / ObjectInformation.cpp
index 942cbad..94134d6 100644 (file)
@@ -1,3 +1,9 @@
+/* Copyright (c) 2014-2015. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #include "src/mc/Frame.hpp"
 #include "src/mc/ObjectInformation.hpp"
 #include "src/mc/Variable.hpp"
@@ -121,7 +127,7 @@ void ObjectInformation::remove_global_variable(const char* name)
         end++;
       // Remove the whole range:
       this->global_variables.erase(
-        this->global_variables.begin() + cursor,
+        this->global_variables.begin() + start,
         this->global_variables.begin() + end + 1);
       return;
     } else if (cmp < 0)