summaryrefslogtreecommitdiff
path: root/ZAPD/ZTextMM.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2024-01-04 21:38:03 -0500
committerNicholas Estelami <NEstelami@users.noreply.github.com>2024-01-04 21:38:03 -0500
commit01615a6c4c6f8e95149fd52ab85b1ae970167bc3 (patch)
tree6cc423ad976ce81c214763c64fafab013e0c192e /ZAPD/ZTextMM.cpp
parentfc881b984b653e52042bb770b94f1ab95a909f3c (diff)
Fixed improperly parsed MM Text
Diffstat (limited to 'ZAPD/ZTextMM.cpp')
-rw-r--r--ZAPD/ZTextMM.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/ZAPD/ZTextMM.cpp b/ZAPD/ZTextMM.cpp
index fc37051..9709868 100644
--- a/ZAPD/ZTextMM.cpp
+++ b/ZAPD/ZTextMM.cpp
@@ -19,10 +19,7 @@ void ZTextMM::ParseRawData()
{
ZResource::ParseRawData();
- //ParseOoT();
ParseMM();
-
- int bp2 = 0;
}
void ZTextMM::ParseMM()
@@ -70,9 +67,10 @@ void ZTextMM::ParseMM()
unsigned char c = rawData[msgPtr];
unsigned int extra = 0;
bool stop = false;
+ bool shouldTerminateOnNull = parent->GetName() == "staff_message_data_static";
// Continue parsing until we are told to stop and all extra bytes are read
- while ((c != '\0' && !stop) || extra > 0)
+ while (( (c != '\0' || !shouldTerminateOnNull) && !stop) || extra > 0)
{
msgEntry.msg += c;
msgPtr++;
@@ -81,7 +79,7 @@ void ZTextMM::ParseMM()
if (extra == 0)
{
// End marker, so stop this message and do not read anything else
- if (c == 0x02)
+ if (c == 0xBF)
{
stop = true;
}