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 e9a5622..d47e097 100644 (file)
@@ -21,7 +21,7 @@ lz_extend(const u8 * const strptr, const u8 * const matchptr,
 {
        u32 len = start_len;
 
-       if (UNALIGNED_ACCESS_IS_FAST) {
+       if (UNALIGNED_ACCESS_IS_FAST && CPU_IS_LITTLE_ENDIAN) {
 
                machine_word_t v_word;