fix the adding (#15121)
authorSergey Andreenko <seandree@microsoft.com>
Tue, 21 Nov 2017 00:20:56 +0000 (16:20 -0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2017 00:20:56 +0000 (16:20 -0800)
src/ToolBox/superpmi/superpmi-shared/lightweightmap.h

index 12e7100..c31b43e 100644 (file)
@@ -374,7 +374,7 @@ public:
         // O(log n) version
         int first = 0;
         int mid   = 0;
-        int last  = numItems;
+        int last  = numItems - 1;
         while (first <= last)
         {
             mid     = (first + last) / 2; // compute mid point.