Compare commits

...

3 commits

Author SHA1 Message Date
Tristan Cormier
d1ea955ff1 fix(build): narrowing conversions in CObjectHeap::Delete 2025-08-23 10:16:20 -04:00
Tristan Cormier
5127106d3c fix(build): narrowing conversions in CObjectHeap::Ptr 2025-08-23 10:16:07 -04:00
Tristan Cormier
0282ca061a fix(build): include missing size_t definition in MD5.hpp 2025-08-23 10:08:01 -04:00
2 changed files with 9 additions and 8 deletions

View file

@ -1,6 +1,7 @@
#ifndef COMMON_MD5_HPP #ifndef COMMON_MD5_HPP
#define COMMON_MD5_HPP #define COMMON_MD5_HPP
#include <cstddef>
#include <cstdint> #include <cstdint>
typedef struct { typedef struct {

View file

@ -69,10 +69,10 @@ void* CObjectHeap::Ptr(uint32_t index, uint32_t objSize, uint32_t heapObjects) {
if (index >= heapObjects) { if (index >= heapObjects) {
const char* format = "\"%s\", %s = %ld (0x%08X)"; const char* format = "\"%s\", %s = %ld (0x%08X)";
const uint8_t bytes[4] = { const uint8_t bytes[4] = {
(index >> 24) & 0xFF, static_cast<uint8_t>((index >> 24) & 0xFF),
(index >> 16) & 0xFF, static_cast<uint8_t>((index >> 16) & 0xFF),
(index >> 8) & 0xFF, static_cast<uint8_t>((index >> 8) & 0xFF),
index & 0xFF static_cast<uint8_t>(index & 0xFF)
}; };
if (isprint(bytes[0]) if (isprint(bytes[0])
@ -107,10 +107,10 @@ void CObjectHeap::Delete(uint32_t index, uint32_t objSize, uint32_t heapObjects)
if (index >= heapObjects) { if (index >= heapObjects) {
const char* format = "\"%s\", %s = %ld (0x%08X)"; const char* format = "\"%s\", %s = %ld (0x%08X)";
const uint8_t bytes[4] = { const uint8_t bytes[4] = {
(index >> 24) & 0xFF, static_cast<uint8_t>((index >> 24) & 0xFF),
(index >> 16) & 0xFF, static_cast<uint8_t>((index >> 16) & 0xFF),
(index >> 8) & 0xFF, static_cast<uint8_t>((index >> 8) & 0xFF),
index & 0xFF static_cast<uint8_t>(index & 0xFF)
}; };
if (isprint(bytes[0]) && isprint(bytes[1]) && isprint(bytes[2]) && isprint(bytes[3])) { if (isprint(bytes[0]) && isprint(bytes[1]) && isprint(bytes[2]) && isprint(bytes[3])) {