From a395359644a4b8224c697d1f93f7f50a5e47ccba Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 26 Oct 2002 16:11:29 +0000 Subject: [PATCH] BrandingText /TRIM* "" will now use the default string too git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1471 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index 31388bb8..7db4ed9a 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -1807,17 +1807,19 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char CDialogTemplate td(dlg); free(dlg); - char str[512]; - extern const char *NSIS_VERSION; - if (line.getnumtokens()==a+1) - lstrcpy(str, line.gettoken_str(a)); - else - wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION); + if (trim) { + char str[512]; + extern const char *NSIS_VERSION; + if (line.getnumtokens()==a+1 && line.gettoken_str(a)[0]) + lstrcpy(str, line.gettoken_str(a)); + else + wsprintf(str, "Nullsoft Install System %s", NSIS_VERSION); - switch (trim) { - case 1: td.LTrimToString(IDC_VERSTR, str, 4); break; - case 2: td.RTrimToString(IDC_VERSTR, str, 4); break; - case 3: td.CTrimToString(IDC_VERSTR, str, 4); break; + switch (trim) { + case 1: td.LTrimToString(IDC_VERSTR, str, 4); break; + case 2: td.RTrimToString(IDC_VERSTR, str, 4); break; + case 3: td.CTrimToString(IDC_VERSTR, str, 4); break; + } } DWORD dwSize;