Standardizing wchar->char in main().
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include <gflags/gflags.h>
|
||||
#include <io.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
// 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<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.
|
||||
|
||||
Reference in New Issue
Block a user