mirror of
https://github.com/ZDoom/wadext.git
synced 2024-11-21 19:32:32 +00:00
Fix segmentation fault in IsPatch.
Change pointer to long in IsPatch to pointer to uint32_t. The size of long depends on the implementation, most posix systems are LP64, wich means long is 64 bits not 32 bits like in Windows. The program now seems to work on Linux with GCC.
This commit is contained in:
parent
6219e4ab7c
commit
d8bee03707
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ char * getdir(const char * lump)
|
||||||
bool isPatch(const char * n)
|
bool isPatch(const char * n)
|
||||||
{
|
{
|
||||||
if (!pstartfound || PNames.mLump < 0) return false;
|
if (!pstartfound || PNames.mLump < 0) return false;
|
||||||
long * l = (long*)PNames.Address();
|
uint32_t * l = (uint32_t*)PNames.Address();
|
||||||
char * c = (char*)(l + 1);
|
char * c = (char*)(l + 1);
|
||||||
char nn[9];
|
char nn[9];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue