]> wimlib.net Git - wimlib/commitdiff
lz_extend: little endian CPU is necessary for byte count to work
authorEric Biggers <ebiggers3@gmail.com>
Thu, 11 Dec 2014 01:45:07 +0000 (19:45 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 11 Dec 2014 01:45:11 +0000 (19:45 -0600)
include/wimlib/lz_extend.h

index e9a56224ea0768104838576815c43d58179bf545..d47e0976d5836ff0214dcfc6563bec63911a559d 100644 (file)
@@ -21,7 +21,7 @@ lz_extend(const u8 * const strptr, const u8 * const matchptr,
 {
        u32 len = start_len;
 
 {
        u32 len = start_len;
 
-       if (UNALIGNED_ACCESS_IS_FAST) {
+       if (UNALIGNED_ACCESS_IS_FAST && CPU_IS_LITTLE_ENDIAN) {
 
                machine_word_t v_word;
 
 
                machine_word_t v_word;