From d08b963619c83bef4bfc77c0c4803f891f55a3e3 Mon Sep 17 00:00:00 2001 From: kichik Date: Wed, 4 Feb 2004 23:12:54 +0000 Subject: [PATCH] fixed uninstallers (thanks again eccles ;) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3464 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/exehead/Main.c b/Source/exehead/Main.c index 0bd7a7ae..ceaf68fb 100644 --- a/Source/exehead/Main.c +++ b/Source/exehead/Main.c @@ -157,13 +157,12 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam, if (g_is_uninstaller) { char *p=cmdline; - while (*p) p++; - while (p >= cmdline && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--; + while (p >= realcmds && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--; m_Err = _LANG_UNINSTINITERROR; - if (p >= cmdline) + if (p >= realcmds) { *(p-1)=0; // terminate before the " _?=" p+=3; // skip over _?=