aboutsummaryrefslogtreecommitdiff
path: root/libarchive/test/test_read_format_rar5.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/test/test_read_format_rar5.c')
-rw-r--r--libarchive/test/test_read_format_rar5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libarchive/test/test_read_format_rar5.c b/libarchive/test/test_read_format_rar5.c
index 0ccedc76f376..7f2f32df48c5 100644
--- a/libarchive/test/test_read_format_rar5.c
+++ b/libarchive/test/test_read_format_rar5.c
@@ -28,6 +28,7 @@
* help. */
#define __LIBARCHIVE_BUILD
#include <archive_crc32.h>
+#include <archive_endian.h>
#define PROLOGUE(reffile) \
struct archive_entry *ae; \
@@ -81,7 +82,7 @@ int verify_data(const uint8_t* data_ptr, int magic, int size) {
/* *lptr is a value inside unpacked test file, val is the
* value that should be in the unpacked test file. */
- if(*lptr != val)
+ if(archive_le32dec(lptr) != (uint32_t) val)
return 0;
}