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.
This commit is contained in:
Raph Levien 2016-04-19 12:52:23 -07:00
parent 4864e0e90b
commit 6923bc5fc7
2 changed files with 2 additions and 2 deletions

View file

@ -330,7 +330,7 @@ fn trie_range_leaf(c: usize, bitmap_chunk: u64) -> bool {
fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool {
let c = c as usize;
if c < 0x800 {
trie_range_leaf(c, r.r1[c >> 8])
trie_range_leaf(c, r.r1[c >> 6])
} else if c < 0x10000 {
let child = r.r2[c >> 6];
trie_range_leaf(c, r.r3[child as usize])

View file

@ -37,7 +37,7 @@ fn trie_range_leaf(c: usize, bitmap_chunk: u64) -> bool {
fn trie_lookup_range_table(c: char, r: &'static BoolTrie) -> bool {
let c = c as usize;
if c < 0x800 {
trie_range_leaf(c, r.r1[c >> 8])
trie_range_leaf(c, r.r1[c >> 6])
} else if c < 0x10000 {
let child = r.r2[c >> 6];
trie_range_leaf(c, r.r3[child as usize])