From 02230ca992fdd72067430798a07529893cd216e4 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Fri, 8 Feb 2013 16:40:47 +0000 Subject: [PATCH] endian swap on FOURCC for "PACK" on BE systems. --- pak.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pak.c b/pak.c index 494ad7f..a272e9e 100644 --- a/pak.c +++ b/pak.c @@ -210,6 +210,9 @@ static pak_file_t *pak_open_write(const char *file) { pak->insert = true; pak->header.magic = PAK_FOURCC; + /* on BE systems we need to swap the byte order of the FOURCC */ + util_endianswap(&pak->header.magic, 1, sizeof(uint32_t)); + /* * We need to write out the header since files will be wrote out to * this even with directory entries, and that not wrote. The header -- 2.39.2