From 448b66a7ef5a2cbffac8f2695292dca85c8be256 Mon Sep 17 00:00:00 2001 From: kichik Date: Mon, 11 Nov 2002 17:37:59 +0000 Subject: [PATCH] Page ignores "" as a function git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1672 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index 0f3d3455..a0ed017e 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -534,8 +534,10 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char if (*line.gettoken_str(2)) p.prefunc = ns_func.add(line.gettoken_str(2),0); if (line.getnumtokens()>3) { - if (k) - p.postfunc = ns_func.add(line.gettoken_str(3),0); + if (k) { + if (*line.gettoken_str(3)) + p.postfunc = ns_func.add(line.gettoken_str(3),0); + } else p.caption = add_string_main(line.gettoken_str(3),0); if (line.getnumtokens()>4) @@ -623,19 +625,23 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char if (line.getnumtokens()>2) { #ifdef NSIS_SUPPORT_CODECALLBACKS if (*line.gettoken_str(2)) { - if (strnicmp(line.gettoken_str(2),"un.",3)) { - ERROR_MSG("\nError: function must have a un. prefix!\n"); - return PS_ERROR; - } - p.prefunc = ns_func.add(line.gettoken_str(2),0); - } - if (line.getnumtokens()>3) { - if (k) { - if (strnicmp(line.gettoken_str(3),"un.",3)) { + if (*line.gettoken_str(2)) { + if (strnicmp(line.gettoken_str(2),"un.",3)) { ERROR_MSG("\nError: function must have a un. prefix!\n"); return PS_ERROR; } - p.postfunc = ns_func.add(line.gettoken_str(3),0); + p.prefunc = ns_func.add(line.gettoken_str(2),0); + } + } + if (line.getnumtokens()>3) { + if (k) { + if (*line.gettoken_str(3)) { + if (strnicmp(line.gettoken_str(3),"un.",3)) { + ERROR_MSG("\nError: function must have a un. prefix!\n"); + return PS_ERROR; + } + p.postfunc = ns_func.add(line.gettoken_str(3),0); + } } else p.caption = add_string_uninst(line.gettoken_str(3),0);