Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
status: add option to show ignored files differently
[gitweb.git]
/
utf8.c
diff --git
a/utf8.c
b/utf8.c
index 47a42047c814fb5c1a933d75fe1b5ecf338dfda1..2c27ce0137f8a60ca2fadf855f2c67738931e2f8 100644
(file)
--- a/
utf8.c
+++ b/
utf8.c
@@
-32,7
+32,7
@@
static int bisearch(ucs_char_t ucs, const struct interval *table, int max)
if (ucs < table[0].first || ucs > table[max].last)
return 0;
while (max >= min) {
- mid =
(min + max
) / 2;
+ mid =
min + (max - min
) / 2;
if (ucs > table[mid].last)
min = mid + 1;
else if (ucs < table[mid].first)