summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fns.c b/src/fns.c
index b6e871ad49c..eeb65cadf3f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -497,8 +497,13 @@ Symbols are also allowed; their print names are used instead. */)
int ws = sizeof (word_t);
const word_t *w1 = (const word_t *) SDATA (string1);
const word_t *w2 = (const word_t *) SDATA (string2);
- while (b < nb - ws + 1 && w1[b / ws] == w2[b / ws])
- b += ws;
+ while (b < nb - ws + 1)
+ {
+ if (UNALIGNED_LOAD_SIZE (w1, b / ws)
+ != UNALIGNED_LOAD_SIZE (w2, b / ws))
+ break;
+ b += ws;
+ }
}
/* Scan forward to the differing byte. */