summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-07 01:20:15 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-07 01:20:15 +0200
commit9db119f8a2e5a4d877f00b9efb40e4a109c95ef7 (patch)
tree9d30248278656913599b01dd0fc70a3b0e7e7e24 /src/core/file_sys
parentgame_list: Accept *.kip as a file extension of executables (diff)
downloadyuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar.gz
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar.bz2
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar.lz
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar.xz
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.tar.zst
yuzu-9db119f8a2e5a4d877f00b9efb40e4a109c95ef7.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/kernel_executable.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/file_sys/kernel_executable.cpp b/src/core/file_sys/kernel_executable.cpp
index 45cbde4c9..371300684 100644
--- a/src/core/file_sys/kernel_executable.cpp
+++ b/src/core/file_sys/kernel_executable.cpp
@@ -34,7 +34,7 @@ bool DecompressBLZ(std::vector<u8>& data) {
--index;
auto control = data[index + start_offset];
for (size_t i = 0; i < 8; ++i) {
- if ((control & 0x80) > 0) {
+ if (((control << i) & 0x80) > 0) {
if (index < 2) {
return false;
}
@@ -70,9 +70,8 @@ bool DecompressBLZ(std::vector<u8>& data) {
data[out_index + start_offset] = data[index + start_offset];
}
- control <<= 1;
if (out_index == 0)
- return true;
+ break;
}
}
@@ -132,15 +131,15 @@ std::vector<u8> KIP::GetSectionDecompressed(u8 index) const {
}
bool KIP::Is64Bit() const {
- return header.flags & 0x8;
+ return (header.flags & 0x8) != 0;
}
bool KIP::Is39BitAddressSpace() const {
- return header.flags & 0x10;
+ return (header.flags & 0x10) != 0;
}
bool KIP::IsService() const {
- return header.flags & 0x20;
+ return (header.flags & 0x20) != 0;
}
std::vector<u32> KIP::GetKernelCapabilities() const {