Skip to content

Commit

Permalink
Merge pull request #18550 from GermanAizek/fix-memsize-type
Browse files Browse the repository at this point in the history
[Common Data Net/Core Debugger HLE/GPU Debugger] Fixed reduction data type size to strict 32-bit integer
  • Loading branch information
hrydgard committed Dec 14, 2023
2 parents d64b610 + 309f0d9 commit 1552221
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Common/Data/Format/ZIMLoad.cpp
Expand Up @@ -132,9 +132,9 @@ int LoadZIM(const char *filename, int *width, int *height, int *format, uint8_t
return 0;
}

int retval = LoadZIMPtr(buffer, (int)size, width, height, format, image);
int retval = LoadZIMPtr(buffer, size, width, height, format, image);
if (!retval) {
ERROR_LOG(IO, "Not a valid ZIM file: %s (size: %d bytes)", filename, (int)size);
ERROR_LOG(IO, "Not a valid ZIM file: %s (size: %lld bytes)", filename, (long long)size);
}
delete [] buffer;
return retval;
Expand Down
2 changes: 1 addition & 1 deletion Common/Net/HTTPServer.cpp
Expand Up @@ -118,7 +118,7 @@ void ServerRequest::WriteHttpResponseHeader(const char *ver, int status, int64_t
buffer->Printf("Content-Length: %llu\r\n", size);
}
if (otherHeaders) {
buffer->Push(otherHeaders, (int)strlen(otherHeaders));
buffer->Push(otherHeaders, strlen(otherHeaders));
}
buffer->Push("\r\n");
}
Expand Down
2 changes: 1 addition & 1 deletion Core/Debugger/SymbolMap.cpp
Expand Up @@ -1114,7 +1114,7 @@ void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) {

case ST_DATA:
{
int count = ARRAYSIZE(defaultSymbols)+(int)activeData.size();
size_t count = ARRAYSIZE(defaultSymbols)+activeData.size();
SendMessage(listbox, LB_INITSTORAGE, (WPARAM)count, (LPARAM)count * 30);

for (int i = 0; i < ARRAYSIZE(defaultSymbols); i++) {
Expand Down
2 changes: 1 addition & 1 deletion Core/HLE/sceKernelModule.cpp
Expand Up @@ -1912,7 +1912,7 @@ bool __KernelLoadGEDump(const std::string &base_filename, std::string *error_str
};

for (size_t i = 0; i < ARRAY_SIZE(runDumpCode); ++i) {
Memory::WriteUnchecked_U32(runDumpCode[i], mipsr4k.pc + (int)i * sizeof(u32_le));
Memory::WriteUnchecked_U32(runDumpCode[i], mipsr4k.pc + (u32)i * sizeof(u32_le));
}

PSPModule *module = new PSPModule();
Expand Down
2 changes: 1 addition & 1 deletion GPU/Debugger/Playback.cpp
Expand Up @@ -369,7 +369,7 @@ bool DumpExecute::SubmitCmds(const void *p, u32 sz) {
gpu->EnableInterrupts(true);
}

u32 pendingSize = (int)execListQueue.size() * sizeof(u32);
u32 pendingSize = (u32)execListQueue.size() * sizeof(u32);
// Validate space for jump.
u32 allocSize = pendingSize + sz + 8;
if (execListPos + allocSize >= execListBuf + LIST_BUF_SIZE) {
Expand Down

0 comments on commit 1552221

Please sign in to comment.