From 6d8dc58dae8f9037a4dbeaf513c2d525bb81049d Mon Sep 17 00:00:00 2001 From: sunjammerx Date: Sun, 5 Jan 2003 15:05:21 +0000 Subject: [PATCH] Inverted test of offset[3] for EW_DELREG meant that RegDeleteKey and RegDeleteValue were being swapped. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2036 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 2 +- Source/script.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index aaf9da70..653cecdd 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -1168,7 +1168,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) int rootkey=parm0; char *buf3=process_string_fromparm_tobuf(0x31); exec_errorflag++; - if (parm3) + if (!parm3) { HKEY hKey; if (RegOpenKeyEx((HKEY)rootkey,buf3,0,KEY_ALL_ACCESS,&hKey) == ERROR_SUCCESS) diff --git a/Source/script.cpp b/Source/script.cpp index 3b394272..dcd446d7 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3309,6 +3309,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char case TOK_DELETEREGKEY: { int a=1; + ent.offsets[3]=0; if (which_token==TOK_DELETEREGKEY) { ent.offsets[3]=1;