summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/kernel_executable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys/kernel_executable.cpp')
-rw-r--r--src/core/file_sys/kernel_executable.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/file_sys/kernel_executable.cpp b/src/core/file_sys/kernel_executable.cpp
index ef93ef3ed..fa758b777 100644
--- a/src/core/file_sys/kernel_executable.cpp
+++ b/src/core/file_sys/kernel_executable.cpp
@@ -36,14 +36,14 @@ bool DecompressBLZ(std::vector<u8>& data) {
while (out_index > 0) {
--index;
auto control = data[index + start_offset];
- for (size_t i = 0; i < 8; ++i) {
+ for (std::size_t i = 0; i < 8; ++i) {
if (((control << i) & 0x80) > 0) {
if (index < 2) {
return false;
}
index -= 2;
- std::size_t segment_offset =
- data[index + start_offset] | data[index + start_offset + 1] << 8;
+ std::size_t segment_offset = static_cast<u32>(data[index + start_offset]) |
+ static_cast<u32>(data[index + start_offset + 1] << 8);
std::size_t segment_size = ((segment_offset >> 12) & 0xF) + 3;
segment_offset &= 0xFFF;
segment_offset += 3;