Skip to content

Commit 0149dc8

Browse files
authored
[cache] Fix getter for 16bit caches (#289)
From harfbuzz/harfbuzz#5616
1 parent da4fcb2 commit 0149dc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hb/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<const KEY_BITS: usize, const VALUE_BITS: usize, const CACHE_SIZE: usize, T:
106106
let tag = stored >> VALUE_BITS;
107107
let expected_tag = key >> (CACHE_SIZE as u32).ilog2();
108108

109-
if stored == u32::MAX || tag != expected_tag {
109+
if stored == T::default().get() || tag != expected_tag {
110110
return None;
111111
}
112112

0 commit comments

Comments
 (0)