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:
Rayyan Ansari
2023-11-06 21:27:09 +00:00
parent 2b3bba512e
commit 8fa9705079
3 changed files with 3 additions and 3 deletions

View File

@ -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)