Merge pull request #8268 from Robyt3/Snapshot-Print-Warning-Fix

Fix warning because of incorrect format argument for `size_t`
This commit is contained in:
Dennis Felsing 2024-04-27 04:36:41 +00:00 committed by GitHub
commit 17ae602d6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -447,7 +447,7 @@ int CSnapshotDelta::DebugDumpDelta(const void *pSrcData, int DataSize)
}
if(*pData < 0 || (size_t)*pData > std::numeric_limits<int32_t>::max() / sizeof(int32_t))
{
dbg_msg("delta_dump", "| Invalid delta. Item size %d out of range (0 - %lu)", *pData, std::numeric_limits<int32_t>::max() / sizeof(int32_t));
dbg_msg("delta_dump", "| Invalid delta. Item size %d out of range (0 - %" PRIzu ")", *pData, std::numeric_limits<int32_t>::max() / sizeof(int32_t));
return -204;
}
dbg_msg("delta_dump", "| %3d %12d %08x updated size=%d", DumpIndex++, *pData, *pData, *pData);
@ -478,7 +478,7 @@ int CSnapshotDelta::DebugDumpDelta(const void *pSrcData, int DataSize)
dbg_assert(pItemEnd == pData, "Incorrect amount of data dumped for this item.");
}
dbg_msg("delta_dump", "| Finished with expected_data_size=%d parsed_data_size=%lu", DataSize, (pData - (int *)pSrcData) * sizeof(int32_t));
dbg_msg("delta_dump", "| Finished with expected_data_size=%d parsed_data_size=%" PRIzu, DataSize, (pData - (int *)pSrcData) * sizeof(int32_t));
dbg_msg("delta_dump", "+--------------------");
return 0;