GCMemcard: Get rid of stray signed length in ImportGciInternal().

This commit is contained in:
Admiral H. Curtiss 2019-05-05 02:37:37 +02:00
parent 2d38364410
commit cbc5acb8cd
2 changed files with 4 additions and 4 deletions

View File

@ -882,9 +882,9 @@ u32 GCMemcard::ImportGciInternal(File::IOFile&& gci, const std::string& inputFil
DEntry tempDEntry;
gci.ReadBytes(&tempDEntry, DENTRY_SIZE);
const int fStart = (int)gci.Tell();
const u64 fStart = gci.Tell();
gci.Seek(0, SEEK_END);
const int length = (int)gci.Tell() - fStart;
const u64 length = gci.Tell() - fStart;
gci.Seek(offset + DENTRY_SIZE, SEEK_SET);
Gcs_SavConvert(tempDEntry, offset, length);
@ -1022,7 +1022,7 @@ u32 GCMemcard::ExportGci(u8 index, const std::string& fileName, const std::strin
return WRITEFAIL;
}
void GCMemcard::Gcs_SavConvert(DEntry& tempDEntry, int saveType, int length)
void GCMemcard::Gcs_SavConvert(DEntry& tempDEntry, int saveType, u64 length)
{
switch (saveType)
{

View File

@ -420,7 +420,7 @@ public:
// GCI files are untouched, SAV files are byteswapped
// GCS files have the block count set, default is 1 (For export as GCS)
static void Gcs_SavConvert(DEntry& tempDEntry, int saveType, int length = BLOCK_SIZE);
static void Gcs_SavConvert(DEntry& tempDEntry, int saveType, u64 length = BLOCK_SIZE);
// reads the banner image
bool ReadBannerRGBA8(u8 index, u32* buffer) const;