Commit 506ee9a6 authored by mercury233's avatar mercury233

update

parent e9b63c2d
...@@ -252,11 +252,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -252,11 +252,11 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
ZeroMemory(&si, sizeof(si)); ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si); si.cb = sizeof(si);
ZeroMemory(&pi, sizeof(pi)); ZeroMemory(&pi, sizeof(pi));
LPTSTR cmd = new TCHAR[MAX_PATH]; wchar_t* cmd = new wchar_t[MAX_PATH];
int flag = 0; int flag = 0;
flag += (mainGame->chkBotHand->isChecked() ? 0x1 : 0); flag += (mainGame->chkBotHand->isChecked() ? 0x1 : 0);
myswprintf(cmd, L"Bot.exe \"%ls\" %d %d", mainGame->botInfo[sel].command, flag, mainGame->gameConf.serverport); myswprintf(cmd, L"Bot.exe \"%ls\" %d %d", mainGame->botInfo[sel].command, flag, mainGame->gameConf.serverport);
if(!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) if(!CreateProcessW(NULL, (LPWSTR)cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{ {
NetServer::StopServer(); NetServer::StopServer();
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment