bug fixes

This commit is contained in:
rjkiv
2025-08-10 10:15:14 -07:00
parent f80d7dda62
commit da17dd573d
2 changed files with 16 additions and 2 deletions

View File

@@ -1635,7 +1635,7 @@ namespace kernel32 {
}
const size_t copyLen = std::min(len, nSize - 1);
memcpy(lpFilename, stringToWideString(path.c_str()).data(), copyLen);
memcpy(lpFilename, stringToWideString(path.c_str()).data(), copyLen * 2);
if (copyLen < nSize) {
lpFilename[copyLen] = 0;
}