endian swap on FOURCC for "PACK" on BE systems.

This commit is contained in:
Dale Weiler 2013-02-08 16:40:47 +00:00
parent 533b2144c5
commit 02230ca992

3
pak.c
View file

@ -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