Use USHRT_MAX instead of MAXWORD (#975)

This commit is contained in:
Christian Semmler
2024-05-30 16:02:58 -04:00
committed by GitHub
parent 76435d803f
commit eeb81b7223
14 changed files with 53 additions and 53 deletions

View File

@@ -122,10 +122,10 @@ void LegoPathPresenter::ParseExtra()
char* extraData;
m_action->GetExtra(extraLength, extraData);
if (extraLength & MAXWORD) {
if (extraLength & USHRT_MAX) {
char extraCopy[256], output[256];
memcpy(extraCopy, extraData, extraLength & MAXWORD);
extraCopy[extraLength & MAXWORD] = '\0';
memcpy(extraCopy, extraData, extraLength & USHRT_MAX);
extraCopy[extraLength & USHRT_MAX] = '\0';
strupr(extraCopy);