Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix binary search removal in ObjectInformation::remove_global_variable()
authorGabriel Corona <gabriel.corona@loria.fr>
Wed, 10 Feb 2016 13:38:46 +0000 (14:38 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 11 Feb 2016 16:08:51 +0000 (17:08 +0100)
src/mc/ObjectInformation.cpp

index 9d66b0e..94134d6 100644 (file)
@@ -127,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)