Match MxStillPresenter::ParseExtra

This commit is contained in:
Christian Semmler 2024-02-29 12:49:05 -05:00
parent 83473472c9
commit 08ef3e2ea3

View File

@ -198,30 +198,28 @@ void MxStillPresenter::ParseExtra()
SetBit3(TRUE); SetBit3(TRUE);
} }
MxU32 len = m_action->GetExtraLength(); MxU16 extraLength;
char* extraData;
m_action->GetExtra(extraLength, extraData);
if (len == 0) { if (extraLength & MAXWORD) {
return; char extraCopy[512];
} memcpy(extraCopy, extraData, extraLength & MAXWORD);
extraCopy[extraLength & MAXWORD] = '\0';
len &= MAXWORD;
char buf[512];
memcpy(buf, m_action->GetExtraData(), len);
buf[len] = '\0';
char output[512]; char output[512];
if (KeyValueStringParse(output, g_strVISIBILITY, buf)) { if (KeyValueStringParse(output, g_strVISIBILITY, extraCopy)) {
if (strcmpi(output, "FALSE") == 0) { if (strcmpi(output, "FALSE") == 0) {
Enable(FALSE); Enable(FALSE);
} }
} }
if (KeyValueStringParse(output, g_strBmpIsmap, buf)) { if (KeyValueStringParse(output, g_strBmpIsmap, extraCopy)) {
SetBit4(TRUE); SetBit4(TRUE);
SetBit1(FALSE); SetBit1(FALSE);
SetBit2(FALSE); SetBit2(FALSE);
} }
}
} }
// FUNCTION: LEGO1 0x100ba2c0 // FUNCTION: LEGO1 0x100ba2c0