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,29 +198,27 @@ 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 output[512];
if (KeyValueStringParse(output, g_strVISIBILITY, extraCopy)) {
char buf[512]; if (strcmpi(output, "FALSE") == 0) {
memcpy(buf, m_action->GetExtraData(), len); Enable(FALSE);
buf[len] = '\0'; }
char output[512];
if (KeyValueStringParse(output, g_strVISIBILITY, buf)) {
if (strcmpi(output, "FALSE") == 0) {
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);
}
} }
} }