projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d366070
)
oops, crash if searching for something smaller than * in the array
author
Dana Jansens
<danakj@orodu.net>
Tue, 21 Sep 2010 00:02:16 +0000
(20:02 -0400)
committer
Dana Jansens
<danakj@orodu.net>
Mon, 24 Jan 2011 19:19:22 +0000
(14:19 -0500)
obt/bsearch.h
patch
|
blob
|
history
diff --git
a/obt/bsearch.h
b/obt/bsearch.h
index
65e4268
..
9613c51
100644
(file)
--- a/
obt/bsearch.h
+++ b/
obt/bsearch.h
@@
-40,8
+40,9
@@
G_BEGIN_DECLS
if ((val) == (ar)[out_BSEARCH]) { \
break; \
} \
- else if ((val) < (ar)[out_BSEARCH]
)
\
+ else if ((val) < (ar)[out_BSEARCH]
&& out_BSEARCH > 0) {
\
r_BSEARCH = out_BSEARCH-1; /* search to the left side */ \
+ } \
else \
l_BSEARCH = out_BSEARCH+1; /* search to the left side */ \
} \