removed several bad casts to 'long'.

The 'long' type should generally be avoided because its size differs on Windows and Linux/Mac so it is almost guaranteed to cause undefined behavior
This commit is contained in:
Professor Hastig 2023-10-04 09:58:18 +02:00 committed by Christoph Oelckers
commit ab8711b57a
15 changed files with 29 additions and 27 deletions

View file

@ -537,7 +537,7 @@ FResourceFile *CheckZip(const char *filename, FileReader &file, LumpFilterInfo*
{
char head[4];
if (file.GetLength() >= (long)sizeof(FZipLocalFileHeader))
if (file.GetLength() >= (ptrdiff_t)sizeof(FZipLocalFileHeader))
{
file.Seek(0, FileReader::SeekSet);
file.Read(&head, 4);