From c93b93fe55377884371f86330c61ff84925208ec Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 1 Jan 2016 12:46:26 -0800 Subject: [PATCH] Standardizing wchar->char in main(). --- src/xenia/base/main_win.cc | 4 +++- tools/build/src/test_suite_main.cc | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xenia/base/main_win.cc b/src/xenia/base/main_win.cc index e314914c0..dd48d6da0 100644 --- a/src/xenia/base/main_win.cc +++ b/src/xenia/base/main_win.cc @@ -13,6 +13,8 @@ #include #include +#include + // Autogenerated by `xb premake`. #include "build/version.h" @@ -72,7 +74,7 @@ int Main() { for (int n = 0; n < argca; n++) { size_t len = wcslen(argv[n]); argva[n] = reinterpret_cast(alloca(len + 1)); - wcstombs_s(nullptr, argva[n], len + 1, argv[n], _TRUNCATE); + std::wcstombs(argva[n], argv[n], len + 1); } // Parse flags; this may delete some of them. diff --git a/tools/build/src/test_suite_main.cc b/tools/build/src/test_suite_main.cc index e093876a3..607811bc4 100644 --- a/tools/build/src/test_suite_main.cc +++ b/tools/build/src/test_suite_main.cc @@ -9,7 +9,7 @@ #include -#include +#include #include #include #include @@ -33,7 +33,7 @@ int main(int argc, wchar_t* argv[]) { for (int n = 0; n < argca; n++) { size_t len = wcslen(argv[n]); argva[n] = (char*)alloca(len + 1); - wcstombs_s(nullptr, argva[n], len + 1, argv[n], _TRUNCATE); + std::wcstombs(argva[n], argv[n], len + 1); } // Parse flags; this may delete some of them.