There was an error while loading. Please reload this page.
2 parents 8ec1175 + 5a093c1 commit c35f491Copy full SHA for c35f491
1 file changed
Modules/cjkcodecs/cjkcodecs.h
@@ -328,22 +328,26 @@ find_pairencmap(ucs2_t body, ucs2_t modifier,
328
min = 0;
329
max = haystacksize;
330
331
- for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1)
+ for (pos = haystacksize >> 1; min != max; pos = (min + max) >> 1) {
332
if (value < haystack[pos].uniseq) {
333
- if (max == pos) break;
334
- else max = pos;
+ if (max != pos) {
+ max = pos;
335
+ continue;
336
+ }
337
}
338
else if (value > haystack[pos].uniseq) {
- if (min == pos) break;
- else min = pos;
339
+ if (min != pos) {
340
+ min = pos;
341
342
343
- else
- break;
344
+ break;
345
346
- if (value == haystack[pos].uniseq)
- return haystack[pos].code;
- return DBCINV;
347
+ if (value == haystack[pos].uniseq) {
348
+ return haystack[pos].code;
349
350
+ return DBCINV;
351
352
#endif
353
0 commit comments