Forgot the alignment for compact structs.

Signed-off-by: Nev3r <apophycens@gmail.com>
This commit is contained in:
Nev3r 2018-11-25 11:35:19 +01:00
parent b48c1d1ce6
commit d7b3cf9314
2 changed files with 13 additions and 7 deletions

View file

@ -79,13 +79,6 @@ int snprintf(char *str, size_t n, const char *fmt, ...);
#define O_BINARY 0
#endif
#if defined(_MSC_VER)
#pragma pack(1)
#endif
#if defined(_MSC_VER)
#pragma pack()
#endif
typedef struct
{
@ -466,6 +459,9 @@ static boolean ResFindSignature (FILE* handle, char endPat[], UINT32 startpos)
return false;
}
#if defined(_MSC_VER)
#pragma pack(1)
#endif
typedef struct zend_s
{
char signature[4];
@ -513,6 +509,9 @@ typedef struct zlentry_s
UINT16 namelen;
UINT16 xtralen;
} ATTRPACK zlentry_t;
#if defined(_MSC_VER)
#pragma pack()
#endif
/** Create a lumpinfo_t array for a PKZip file.
*/

View file

@ -24,12 +24,19 @@
// a raw entry of the wad directory
// NOTE: This sits here and not in w_wad.c because p_setup.c makes use of it to load map WADs inside PK3s.
#if defined(_MSC_VER)
#pragma pack(1)
#endif
typedef struct
{
UINT32 filepos; // file offset of the resource
UINT32 size; // size of the resource
char name[8]; // name of the resource
} ATTRPACK filelump_t;
#if defined(_MSC_VER)
#pragma pack()
#endif
// ==============================================================
// WAD FILE STRUCTURE DEFINITIONS