diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index ceaf68fb..89b49fa2 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -156,7 +156,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, #ifdef NSIS_CONFIG_UNINSTALL_SUPPORT if (g_is_uninstaller) { - char *p=cmdline; + char *p=realcmds; + while (*p) p++; while (p >= realcmds && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--; @@ -271,4 +272,4 @@ void NSISCALL CleanUp() // Clean up after plug-ins doRMDir(state_plugins_dir, 1); #endif // NSIS_CONFIG_PLUGIN_SUPPORT -} \ No newline at end of file +}