mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
lm: Minor logging fix to skip a byte.
This commit is contained in:
parent
6a36ffb86c
commit
22465c8722
|
@ -47,6 +47,7 @@ private:
|
||||||
|
|
||||||
/// Log field type
|
/// Log field type
|
||||||
enum class Field : u8 {
|
enum class Field : u8 {
|
||||||
|
Skip = 1,
|
||||||
Message = 2,
|
Message = 2,
|
||||||
Line = 3,
|
Line = 3,
|
||||||
Filename = 4,
|
Filename = 4,
|
||||||
|
@ -85,6 +86,11 @@ private:
|
||||||
while (addr < end_addr) {
|
while (addr < end_addr) {
|
||||||
const Field field{static_cast<Field>(Memory::Read8(addr++))};
|
const Field field{static_cast<Field>(Memory::Read8(addr++))};
|
||||||
size_t length{Memory::Read8(addr++)};
|
size_t length{Memory::Read8(addr++)};
|
||||||
|
|
||||||
|
if (static_cast<Field>(Memory::Read8(addr)) == Field::Skip) {
|
||||||
|
++addr;
|
||||||
|
}
|
||||||
|
|
||||||
switch (field) {
|
switch (field) {
|
||||||
case Field::Message:
|
case Field::Message:
|
||||||
message = Memory::ReadCString(addr, length);
|
message = Memory::ReadCString(addr, length);
|
||||||
|
@ -99,6 +105,7 @@ private:
|
||||||
function = Memory::ReadCString(addr, length);
|
function = Memory::ReadCString(addr, length);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr += length;
|
addr += length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue