diff --git a/src/xenia/base/logging.cc b/src/xenia/base/logging.cc index 72b04a1f8..10f3065d5 100644 --- a/src/xenia/base/logging.cc +++ b/src/xenia/base/logging.cc @@ -156,9 +156,12 @@ class Logger { void WriteThread() { RingBuffer rb(buffer_, kBufferSize); uint32_t idle_loops = 0; - while (running_) { + while (true) { bool did_write = false; rb.set_write_offset(write_tail_); + if (!running_ && rb.empty()) { + break; + } while (!rb.empty()) { did_write = true; diff --git a/src/xenia/kernel/user_module.cc b/src/xenia/kernel/user_module.cc index d36aa67ad..7d0b6dbe6 100644 --- a/src/xenia/kernel/user_module.cc +++ b/src/xenia/kernel/user_module.cc @@ -502,9 +502,8 @@ void UserModule::Dump() { } auto library_data = - reinterpret_cast(opt_import_libraries) + - opt_import_libraries->string_table.size + 12; - uint32_t library_offset = 0; + reinterpret_cast(opt_import_libraries); + uint32_t library_offset = opt_import_libraries->string_table.size + 12; while (library_offset < opt_import_libraries->size) { auto library = reinterpret_cast( library_data + library_offset);