X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Flz_binary_trees.c;h=fa866b89e7c71a6d7d5117478b7bf163afb5dbcd;hb=a0114ec301a99e4bd5605bbef9631d8c21285636;hp=4a0537cb4df42ef9ebedd880185fc0c1a6acc734;hpb=f18e3243f913fa48aef3a8cbdad5444cece68cf2;p=wimlib diff --git a/src/lz_binary_trees.c b/src/lz_binary_trees.c index 4a0537cb..fa866b89 100644 --- a/src/lz_binary_trees.c +++ b/src/lz_binary_trees.c @@ -437,7 +437,7 @@ lz_bt_get_matches(struct lz_mf *_mf, struct lz_match matches[]) /* Search the digram table for a length 2 match. */ const u16 digram = mf->next_digram; - mf->next_digram = *(const u16 *)(&window[cur_pos + 1]); + mf->next_digram = load_u16_unaligned(&window[cur_pos + 1]); prefetch(&mf->digram_tab[mf->next_digram]); cur_match = mf->digram_tab[digram]; mf->digram_tab[digram] = cur_pos; @@ -563,7 +563,7 @@ lz_bt_skip_positions(struct lz_mf *_mf, u32 n) do { if (mf->digram_tab) { digram = next_digram; - next_digram = *(const u16 *)(&window[cur_pos + 1]); + next_digram = load_u16_unaligned(&window[cur_pos + 1]); mf->digram_tab[digram] = cur_pos; }