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

@@ -202,10 +202,10 @@ void MxStillPresenter::ParseExtra()
char* extraData;
m_action->GetExtra(extraLength, extraData);
if (extraLength & MAXWORD) {
if (extraLength & USHRT_MAX) {
char extraCopy[512];
memcpy(extraCopy, extraData, extraLength & MAXWORD);
extraCopy[extraLength & MAXWORD] = '\0';
memcpy(extraCopy, extraData, extraLength & USHRT_MAX);
extraCopy[extraLength & USHRT_MAX] = '\0';
char output[512];
if (KeyValueStringParse(output, g_strVISIBILITY, extraCopy)) {