mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
endian swap on FOURCC for "PACK" on BE systems.
This commit is contained in:
parent
533b2144c5
commit
02230ca992
1 changed files with 3 additions and 0 deletions
3
pak.c
3
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
|
||||
|
|
Loading…
Reference in a new issue