mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
ArchiveUtil: use signed return type instead of unsigned
The ExtractFileFromArchive function can sometimes return -1 on error, however the function's return type was specified as u32, which would mean that it would instead be represented as the maximum value. Change the function's return type to the signed s32 instead, and correct uses.
This commit is contained in:
@ -1362,7 +1362,7 @@ bool LoadGBAROM(QStringList filepath)
|
||||
{
|
||||
// file inside archive
|
||||
|
||||
u32 lenread = Archive::ExtractFileFromArchive(filepath.at(0), filepath.at(1), &filedata, &filelen);
|
||||
s32 lenread = Archive::ExtractFileFromArchive(filepath.at(0), filepath.at(1), &filedata, &filelen);
|
||||
if (lenread < 0) return false;
|
||||
if (!filedata) return false;
|
||||
if (lenread != filelen)
|
||||
|
Reference in New Issue
Block a user