From dcc051e505085778ae0f7f547e59e61186c6b541 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 29 Aug 2002 11:27:21 +0000 Subject: [PATCH] Plugin calls can now use /NOUNLOAD too git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@816 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/script.cpp b/Source/script.cpp index 17eefb68..c99ac9fa 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3460,8 +3460,15 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char else command = line.gettoken_str(0); SCRIPT_MSG("Plugin Command: %s",command); + int i = 1; + int nounload = 0; + if (!lstrcmpi(line.gettoken_str(i), "/NOUNLOAD")) { + i++; + nounload++; + } + // First push dll args - for (int i = 1; i < line.getnumtokens(); i++) { + for (; i < line.getnumtokens(); i++) { ent.which=EW_PUSHPOP; ent.offsets[0]=add_string(line.gettoken_str(i)); ent.offsets[1]=0; @@ -3476,6 +3483,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char ent.offsets[0]=tempDLLtab; ent.offsets[1]=add_string(command); ent.offsets[2]=-1; + ent.offsets[3]=nounload; ret=add_entry(&ent); if (ret != PS_OK) return ret;