Silence the last two C4996 warnings in our code

hook_registry.cpp still used strncpy for the hook-name copy (the same
class the log-ring fix addressed) -- replace with a bounded memcpy.
coop_vk_layer.cpp's debug logger used _wfopen -- switch to _wfopen_s.
Both were the only remaining C4996s in our own code.
This commit is contained in:
2026-07-12 12:04:28 +02:00
parent ce996763d5
commit b2b8abdc51
2 changed files with 6 additions and 4 deletions

View File

@@ -151,8 +151,8 @@ void logvk(const char* fmt, ...)
if (GetTempPathW(MAX_PATH, dir) == 0) {
return;
}
FILE* f = _wfopen((std::wstring(dir) + L"coop_vk_layer.log").c_str(), L"a");
if (f == nullptr) {
FILE* f = nullptr;
if (_wfopen_s(&f, (std::wstring(dir) + L"coop_vk_layer.log").c_str(), L"a") != 0 || f == nullptr) {
return;
}
va_list ap;