Fixed a howler with pluralism --- impossible to internationalise
[pspp] / src / algorithm.c
index c6bdae270e044bb5768536a54c304c363ea4f114..ba4413da749f743070a0cddd21a16af32d6fcf3e 100644 (file)
@@ -338,7 +338,7 @@ binary_search (const void *array, size_t count, size_t size,
 {
   assert (array != NULL);
   assert (count <= INT_MAX);
-  assert (aux != NULL);
+  assert (compare != NULL);
 
   if (count != 0) 
     {
@@ -346,7 +346,7 @@ binary_search (const void *array, size_t count, size_t size,
       int low = 0;
       int high = count - 1;
 
-      while (low < high) 
+      while (low <= high) 
         {
           int middle = (low + high) / 2;
           const unsigned char *element = first + middle * size;