Skip to content

Commit 6923bc5

Browse files
committed
Fix wrong shift in trie_lookup_range_table
Somehow got in my head that >> 8 was the right shift for a chunk of 64. Oops, sorry.
1 parent 4864e0e commit 6923bc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/etc/unicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def emit_trie_lookup_range_table(f):
330330
fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool {
331331
let c = c as usize;
332332
if c < 0x800 {
333-
trie_range_leaf(c, r.r1[c >> 8])
333+
trie_range_leaf(c, r.r1[c >> 6])
334334
} else if c < 0x10000 {
335335
let child = r.r2[c >> 6];
336336
trie_range_leaf(c, r.r3[child as usize])

src/librustc_unicode/tables.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn trie_range_leaf(c: usize, bitmap_chunk: u64) -> bool {
3737
fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool {
3838
let c = c as usize;
3939
if c < 0x800 {
40-
trie_range_leaf(c, r.r1[c >> 8])
40+
trie_range_leaf(c, r.r1[c >> 6])
4141
} else if c < 0x10000 {
4242
let child = r.r2[c >> 6];
4343
trie_range_leaf(c, r.r3[child as usize])

0 commit comments

Comments
 (0)