UTF-8 bugfix (leave room for null terminator)

This commit is contained in:
baldurk
2014-12-02 22:39:45 +00:00
parent 72b8725c69
commit 46c70e6f69
+1 -1
View File
@@ -268,7 +268,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInst,
argv[i] = new char[len*4 + 1];
argv[i][len*4] = 0;
WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1, &argv[i][0], (int)len, NULL, NULL);
WideCharToMultiByte(CP_UTF8, 0, wargv[i], -1, &argv[i][0], (int)len+1, NULL, NULL);
}
hInstance = hInst;