diff --git a/engine/common/filesystem.c b/engine/common/filesystem.c index 04af88d7..bc122de2 100644 --- a/engine/common/filesystem.c +++ b/engine/common/filesystem.c @@ -62,7 +62,7 @@ typedef struct stringlist_s typedef struct wadtype_s { char *ext; - char type; + signed char type; } wadtype_t; typedef struct file_s @@ -122,7 +122,7 @@ qboolean fs_caseinsensitive = true; // try to search missing files static void FS_InitMemory( void ); static searchpath_t *FS_FindFile( const char *name, int *index, qboolean gamedironly ); -static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const char matchtype ); +static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const signed char matchtype ); static dpackfile_t *FS_AddFileToPack( const char* name, pack_t *pack, fs_offset_t offset, fs_offset_t size ); static byte *W_LoadFile( const char *path, fs_offset_t *filesizeptr, qboolean gamedironly ); static wfile_t *W_Open( const char *filename, int *errorcode ); @@ -1956,7 +1956,7 @@ static searchpath_t *FS_FindFile( const char *name, int *index, qboolean gamedir else if( search->wad ) { dlumpinfo_t *lump; - char type = W_TypeFromExt( name ); + signed char type = W_TypeFromExt( name ); qboolean anywadname = true; string wadname, wadfolder; string shortname; @@ -2952,7 +2952,7 @@ search_t *FS_Search( const char *pattern, int caseinsensitive, int gamedironly ) else if( searchpath->wad ) { string wadpattern, wadname, temp2; - char type = W_TypeFromExt( pattern ); + signed char type = W_TypeFromExt( pattern ); qboolean anywadname = true; string wadfolder; @@ -3165,7 +3165,7 @@ W_FindLump Serach for already existed lump =========== */ -static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const char matchtype ) +static dlumpinfo_t *W_FindLump( wfile_t *wad, const char *name, const signed char matchtype ) { int left, right; diff --git a/engine/common/filesystem.h b/engine/common/filesystem.h index 67318ada..b5f7d913 100644 --- a/engine/common/filesystem.h +++ b/engine/common/filesystem.h @@ -78,8 +78,8 @@ typedef struct int size; // uncompressed signed char type; // TYP_* signed char attribs; // file attribs - char pad0; - char pad1; + signed char pad0; + signed char pad1; char name[WAD3_NAMELEN]; // must be null terminated } dlumpinfo_t;