From 5c83974226ae4804d73de32b0fd8f67ad97947e7 Mon Sep 17 00:00:00 2001 From: eccles Date: Thu, 5 Feb 2004 14:06:05 +0000 Subject: [PATCH] cmdline and realcmds might not be pointing to the same string. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3466 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 +}