aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/string.c b/string.c
index 04fc5d063d..3bcaa6cd64 100644
--- a/string.c
+++ b/string.c
@@ -449,7 +449,11 @@ search_nonascii(const char *p, const char *e)
const uintptr_t *t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
for (;s < t; s++) {
if (*s & NONASCII_MASK) {
+#if BYTE_ORDER == LITTLE_ENDIAN
return (const char *)s + (ntz_intptr(*s&NONASCII_MASK)>>3);
+#else
+ return (const char *)s + (nlz_intptr(*s&NONASCII_MASK)>>3);
+#endif
}
}
p = (const char *)s;