diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index 97a33805..dcaebe1d 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -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 " _?="