support pstring macsbugs names

This commit is contained in:
Kelvin Sherlock 2013-09-01 22:27:09 -04:00
parent d0bc67e9d5
commit 7196a85c36
2 changed files with 7 additions and 3 deletions

View File

@ -148,10 +148,12 @@ namespace {
// check for MacsBug name after rts.
std::string s;
unsigned b = Debug::ReadByte(pc);
if (b > 0x80 && b < 0xa0)
if (b >= 0x80 && b <= 0x9f)
{
b -= 0x80;
pc++;
if (!b) b = Debug::ReadByte(pc++);
s.reserve(b);
for (unsigned i = 0; i < b; ++i)
{
@ -159,7 +161,6 @@ namespace {
}
printf("%s\n", s.c_str());
}
// could also be in the form 0x80 \p string.
}

View File

@ -520,10 +520,13 @@ void InstructionLogger()
// check for MacsBug name after rts.
std::string s;
unsigned b = memoryReadByte(pc);
if (b > 0x80 && b < 0xa0)
if (b >= 0x80 && b <= 0x9f)
{
b -= 0x80;
pc++;
if (!b) b = memoryReadByte(pc++);
s.reserve(b);
for (unsigned i = 0; i < b; ++i)
{