DBG+LAUNCHER: fixed launcher with a working directory set
This commit is contained in:
parent
3545cbcb60
commit
d37e75d126
|
@ -4,7 +4,7 @@
|
|||
#include "debugger.h"
|
||||
#include "console.h"
|
||||
|
||||
char commandLine[MAX_COMMAND_LINE_SIZE];
|
||||
char commandLine[MAX_SETTING_SIZE];
|
||||
|
||||
void showcommandlineerror(cmdline_error_t* cmdline_error)
|
||||
{
|
||||
|
|
|
@ -107,9 +107,6 @@ void Command::dataAppend(const char ch)
|
|||
|
||||
void Command::dataFinish()
|
||||
{
|
||||
if(_data.length())
|
||||
{
|
||||
_tokens.push_back(_data);
|
||||
_data.clear();
|
||||
}
|
||||
_tokens.push_back(_data);
|
||||
_data.clear();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ typedef BOOL(WINAPI* LPFN_ISWOW64PROCESS)(HANDLE, PBOOL);
|
|||
typedef BOOL(WINAPI* LPFN_Wow64DisableWow64FsRedirection)(PVOID);
|
||||
typedef BOOL(WINAPI* LPFN_Wow64RevertWow64FsRedirection)(PVOID);
|
||||
|
||||
|
||||
LPFN_Wow64DisableWow64FsRedirection _Wow64DisableRedirection = NULL;
|
||||
LPFN_Wow64RevertWow64FsRedirection _Wow64RevertRedirection = NULL;
|
||||
|
||||
|
@ -479,6 +478,17 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
}
|
||||
cmdLine += L"\"";
|
||||
}
|
||||
else //empty command line
|
||||
{
|
||||
cmdLine += L" \"\"";
|
||||
}
|
||||
|
||||
//append current working directory
|
||||
TCHAR szCurDir[MAX_PATH] = TEXT("");
|
||||
GetCurrentDirectory(_countof(szCurDir), szCurDir);
|
||||
cmdLine += L" \"";
|
||||
cmdLine += szCurDir;
|
||||
cmdLine += L"\"";
|
||||
|
||||
if(canDisableRedirect)
|
||||
rWow.DisableRedirect();
|
||||
|
|
Loading…
Reference in New Issue