|
@@ -264,11 +264,12 @@ int main(int argc, char* argv[]) { |
|
|
int wmain(int argc, wchar_t* argvU16[]) { |
|
|
int wmain(int argc, wchar_t* argvU16[]) { |
|
|
// Initialize char* array with string-owned buffers |
|
|
// Initialize char* array with string-owned buffers |
|
|
std::string argvStr[argc]; |
|
|
std::string argvStr[argc]; |
|
|
const char* argvU8[argc]; |
|
|
|
|
|
|
|
|
const char* argvU8[argc + 1]; |
|
|
for (int i = 0; i < argc; i++) { |
|
|
for (int i = 0; i < argc; i++) { |
|
|
argvStr[i] = string::UTF16toUTF8(argvU16[i]); |
|
|
argvStr[i] = string::UTF16toUTF8(argvU16[i]); |
|
|
argvU8[i] = argvStr[i].c_str(); |
|
|
argvU8[i] = argvStr[i].c_str(); |
|
|
} |
|
|
} |
|
|
|
|
|
argvU8[argc] = NULL; |
|
|
return main(argc, (char**) argvU8); |
|
|
return main(argc, (char**) argvU8); |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |