diff --git a/src/xenia/cpu/lzx.cc b/src/xenia/cpu/lzx.cc index d9ebe9978..cc2546d52 100644 --- a/src/xenia/cpu/lzx.cc +++ b/src/xenia/cpu/lzx.cc @@ -96,10 +96,13 @@ void mspack_memory_sys_destroy(struct mspack_system* sys) { free(sys); } int lzx_decompress(const void* lzx_data, size_t lzx_len, void* dest, size_t dest_len, uint32_t window_size, void* window_data, size_t window_data_len) { - uint32_t window_bits = xe::bit_count(window_size); - int result_code = 1; + uint32_t window_bits; + if (!xe::bit_scan_forward(window_size, &window_bits)) { + return result_code; + } + mspack_system* sys = mspack_memory_sys_create(); mspack_memory_file* lzxsrc = mspack_memory_open(sys, (void*)lzx_data, lzx_len); diff --git a/xenia-build b/xenia-build index 52bf75b37..804573edf 100755 --- a/xenia-build +++ b/xenia-build @@ -1370,7 +1370,7 @@ class TidyCommand(Command): super(TidyCommand, self).__init__( subparsers, name='tidy', - help_short='Runs the clang-tiday checker on all code.', + help_short='Runs the clang-tidy checker on all code.', *args, **kwargs) self.parser.add_argument( '--fix', action='store_true',