mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Fix code quirk (#676)
This commit is contained in:

committed by
GitHub

parent
10ae05a888
commit
78f0455463
@@ -178,13 +178,10 @@ void MxDSAction::MergeFrom(MxDSAction& p_dsAction)
|
|||||||
this->m_up[2] = p_dsAction.m_up[2];
|
this->m_up[2] = p_dsAction.m_up[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
MxU16 extraLength = p_dsAction.m_extraLength;
|
MxU16 extraLength;
|
||||||
char* extraData = p_dsAction.m_extraData;
|
char* extraData;
|
||||||
|
p_dsAction.GetExtra(extraLength, extraData);
|
||||||
|
|
||||||
// Taking those references forces the compiler to move the values onto the stack.
|
|
||||||
// The original code most likely looked different, but this yields a 100% match.
|
|
||||||
MxU16& extraLengthRef = extraLength;
|
|
||||||
char*& extraDataRef = extraData;
|
|
||||||
if (extraLength && extraData) {
|
if (extraLength && extraData) {
|
||||||
if (!this->m_extraData || !strncmp("XXX", this->m_extraData, 3)) {
|
if (!this->m_extraData || !strncmp("XXX", this->m_extraData, 3)) {
|
||||||
delete[] this->m_extraData;
|
delete[] this->m_extraData;
|
||||||
|
Reference in New Issue
Block a user