From cbc5acb8cdac4fe32b1eaae5b866ef142557dee8 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Sun, 5 May 2019 02:37:37 +0200 Subject: [PATCH] GCMemcard: Get rid of stray signed length in ImportGciInternal(). --- Source/Core/Core/HW/GCMemcard/GCMemcard.cpp | 6 +++--- Source/Core/Core/HW/GCMemcard/GCMemcard.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp index 8b15387e84..b3fe865ce1 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.cpp @@ -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) { diff --git a/Source/Core/Core/HW/GCMemcard/GCMemcard.h b/Source/Core/Core/HW/GCMemcard/GCMemcard.h index 3bcd579476..bd3c03ce55 100644 --- a/Source/Core/Core/HW/GCMemcard/GCMemcard.h +++ b/Source/Core/Core/HW/GCMemcard/GCMemcard.h @@ -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;