summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-10 04:30:01 +0200
committerGitHub <noreply@github.com>2018-10-10 04:30:01 +0200
commit5461b21c7ac66c5f01e122faeaf843b3ea939852 (patch)
treeae153d2d1a330f0b18ea12d227aced970974e543 /src/core
parentMerge pull request #1464 from lioncash/unique (diff)
parentips_layer: Silence truncation and conversion warnings (diff)
downloadyuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar.gz
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar.bz2
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar.lz
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar.xz
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.tar.zst
yuzu-5461b21c7ac66c5f01e122faeaf843b3ea939852.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/ips_layer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp
index 6c072d0a3..554eae9bc 100644
--- a/src/core/file_sys/ips_layer.cpp
+++ b/src/core/file_sys/ips_layer.cpp
@@ -107,12 +107,12 @@ VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) {
return nullptr;
if (real_offset + rle_size > in_data.size())
- rle_size = in_data.size() - real_offset;
+ rle_size = static_cast<u16>(in_data.size() - real_offset);
std::memset(in_data.data() + real_offset, data.get(), rle_size);
} else { // Standard Patch
auto read = data_size;
if (real_offset + read > in_data.size())
- read = in_data.size() - real_offset;
+ read = static_cast<u16>(in_data.size() - real_offset);
if (ips->Read(in_data.data() + real_offset, read, offset) != data_size)
return nullptr;
offset += data_size;
@@ -265,7 +265,7 @@ void IPSwitchCompiler::Parse() {
if (patch_line.length() < 11)
break;
auto offset = std::stoul(patch_line.substr(0, 8), nullptr, 16);
- offset += offset_shift;
+ offset += static_cast<unsigned long>(offset_shift);
std::vector<u8> replace;
// 9 - first char of replacement val