Page ignores "" as a function

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1672 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-11-11 17:37:59 +00:00
parent 279b1c3703
commit 448b66a7ef

View file

@ -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);