look for _?= in the entire command line in case realcmds skipped the first and only space

as a question mark is an invalid character in file names, this method shouldn't have false positives


git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4132 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-06-23 22:34:35 +00:00
parent 6e4d079866
commit 62c3903d7f

View file

@ -166,15 +166,15 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
if (g_is_uninstaller)
{
char *p = findchar(realcmds, 0);
char *p = findchar(state_command_line, 0);
// state_command_line has state_install_directory right after it in memory, so reading
// a bit over state_command_line won't do any harm
while (p >= realcmds && *(LPDWORD)p != CHAR4_TO_DWORD(' ', '_', '?', '=')) p--;
while (p >= state_command_line && *(LPDWORD)p != CHAR4_TO_DWORD(' ', '_', '?', '=')) p--;
m_Err = _LANG_UNINSTINITERROR;
if (p >= realcmds)
if (p >= state_command_line)
{
*p=0; // terminate before "_?="
p+=4; // skip over " _?="