summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>2025-10-30 09:12:14 +0100
committerPeng Wu <alexepico@gmail.com>2025-10-31 16:15:11 +0800
commitd3d49569b8cc8bf049fa1032130a3b5e719dc01c (patch)
tree3d329dcccb1f09a8451b193f6c1cc600fcc4e102 /src
parent954ecc3522686fb30a78d12080da1145df3f24da (diff)
downloadlibpinyin-d3d49569b8cc8bf049fa1032130a3b5e719dc01c.tar.gz
libpinyin-d3d49569b8cc8bf049fa1032130a3b5e719dc01c.tar.xz
libpinyin-d3d49569b8cc8bf049fa1032130a3b5e719dc01c.zip
Fix unaligned access in get_range()
Diffstat (limited to 'src')
-rw-r--r--src/storage/phrase_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index bb98251..0f403d6 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -647,7 +647,7 @@ int SubPhraseIndex::get_range(/* out */ PhraseIndexRange & range){
/* remove trailing zeros. */
const table_offset_t * poffset = NULL;
for (poffset = end; poffset > begin + 1; --poffset) {
- if (0 != *(poffset - 1))
+ if (0 != UnalignedMemory<table_offset_t>::load(poffset - 1))
break;
}