summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-09 19:18:20 +0200
committerLioncash <mathew1800@gmail.com>2018-10-09 19:18:23 +0200
commit567e81844038b82e66bf1566c16bca87026ee6e4 (patch)
treeef77bf64ae056cf839f163a00305ddd2444c43c9 /src
parentMerge pull request #1423 from DarkLordZach/romfs-file-exts (diff)
downloadyuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar.gz
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar.bz2
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar.lz
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar.xz
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.tar.zst
yuzu-567e81844038b82e66bf1566c16bca87026ee6e4.zip
Diffstat (limited to 'src')
-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 0cadbc375..184509716 100644
--- a/src/core/file_sys/ips_layer.cpp
+++ b/src/core/file_sys/ips_layer.cpp
@@ -76,12 +76,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;
@@ -225,7 +225,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