From 909a24e3f11c7a7b1fa75a03dcde260585693f36 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 7 Feb 2019 14:57:28 -0800 Subject: [PATCH] Minor code review --- UVAtlasTool/UVAtlas.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UVAtlasTool/UVAtlas.cpp b/UVAtlasTool/UVAtlas.cpp index 284aeb61..0397d11e 100644 --- a/UVAtlasTool/UVAtlas.cpp +++ b/UVAtlasTool/UVAtlas.cpp @@ -203,7 +203,7 @@ namespace void SearchForFiles(const wchar_t* path, std::list& files, bool recursive) { // Process files - WIN32_FIND_DATA findData = {}; + WIN32_FIND_DATAW findData = {}; ScopedFindHandle hFile(safe_handle(FindFirstFileExW(path, FindExInfoBasic, &findData, FindExSearchNameMatch, nullptr, @@ -223,7 +223,7 @@ namespace files.push_back(conv); } - if (!FindNextFile(hFile.get(), &findData)) + if (!FindNextFileW(hFile.get(), &findData)) break; } } @@ -268,7 +268,7 @@ namespace } } - if (!FindNextFile(hFile.get(), &findData)) + if (!FindNextFileW(hFile.get(), &findData)) break; } } @@ -1121,8 +1121,8 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[]) { Mesh::Material mtl = {}; - wchar_t matname[32]; - wsprintf(matname, L"Chart%02Iu", j + 1); + wchar_t matname[32] = {}; + swprintf_s(matname, L"Chart%02Iu", j + 1); mtl.name = matname; mtl.specularPower = 1.f; mtl.alpha = 1.f;