mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Remove USHRT_MAX from ParseExtra functions (#1086)
This commit is contained in:
@@ -96,10 +96,10 @@ void LegoEntityPresenter::ParseExtra()
|
||||
char* extraData;
|
||||
m_action->GetExtra(extraLength, extraData);
|
||||
|
||||
if (extraLength & USHRT_MAX) {
|
||||
if (extraLength) {
|
||||
char extraCopy[512];
|
||||
memcpy(extraCopy, extraData, extraLength & USHRT_MAX);
|
||||
extraCopy[extraLength & USHRT_MAX] = '\0';
|
||||
memcpy(extraCopy, extraData, extraLength);
|
||||
extraCopy[extraLength] = '\0';
|
||||
|
||||
m_entity->ParseAction(extraCopy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user