projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57fab3d
)
Fri Dec 19 23:35:04 2003 Ben Pfaff <blp@gnu.org>
author
Ben Pfaff
<blp@gnu.org>
Sat, 20 Dec 2003 07:40:44 +0000
(07:40 +0000)
committer
Ben Pfaff
<blp@gnu.org>
Sat, 20 Dec 2003 07:40:44 +0000
(07:40 +0000)
* algorithm.c (binary_search): Fix comparison.
src/ChangeLog
patch
|
blob
|
history
src/algorithm.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index e72f20aee10eb5b6d1ca2be08b5566613a58fc85..63c2cc61fef16edaa74f42278a83feabe41c186c 100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-1,3
+1,7
@@
+Fri Dec 19 23:35:04 2003 Ben Pfaff <blp@gnu.org>
+
+ * algorithm.c (binary_search): Fix comparison.
+
Fri Dec 19 23:27:45 2003 Ben Pfaff <blp@gnu.org>
* algorithm.c: (binary_search) Fix assertion.
diff --git
a/src/algorithm.c
b/src/algorithm.c
index 66be93d6b01a0c673ccec491164e53233df6cdb7..ba4413da749f743070a0cddd21a16af32d6fcf3e 100644
(file)
--- a/
src/algorithm.c
+++ b/
src/algorithm.c
@@
-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;