mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 02:41:49 -05:00
Merge pull request #95 from bunnei/lm-skip-byte
lm: Minor logging fix to skip a byte.
This commit is contained in:
commit
b5bc94bce0
1 changed files with 7 additions and 0 deletions
|
@ -47,6 +47,7 @@ private:
|
|||
|
||||
/// Log field type
|
||||
enum class Field : u8 {
|
||||
Skip = 1,
|
||||
Message = 2,
|
||||
Line = 3,
|
||||
Filename = 4,
|
||||
|
@ -85,6 +86,11 @@ private:
|
|||
while (addr < end_addr) {
|
||||
const Field field{static_cast<Field>(Memory::Read8(addr++))};
|
||||
size_t length{Memory::Read8(addr++)};
|
||||
|
||||
if (static_cast<Field>(Memory::Read8(addr)) == Field::Skip) {
|
||||
++addr;
|
||||
}
|
||||
|
||||
switch (field) {
|
||||
case Field::Message:
|
||||
message = Memory::ReadCString(addr, length);
|
||||
|
@ -99,6 +105,7 @@ private:
|
|||
function = Memory::ReadCString(addr, length);
|
||||
break;
|
||||
}
|
||||
|
||||
addr += length;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue