about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/etc/unicode.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/unicode.py b/src/etc/unicode.py
index 57bb36ce994..10b864a902d 100755
--- a/src/etc/unicode.py
+++ b/src/etc/unicode.py
@@ -279,12 +279,12 @@ def emit_bsearch_range_table(f):
 fn bsearch_range_table(c: char, r: &'static [(char, char)]) -> bool {
     use core::cmp::Ordering::{Equal, Less, Greater};
     r.binary_search_by(|&(lo, hi)| {
-         if lo <= c && c <= hi {
-             Equal
+         if c < lo {
+             Greater
          } else if hi < c {
              Less
          } else {
-             Greater
+             Equal
          }
      })
      .is_ok()