From ccec5e08cb65b8acc1c392073b7d4b99c3b6ec91 Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 31 Dec 2005 14:13:16 +0000 Subject: [PATCH] fixed bug #1362443 - BrandingText /TRIM* expands label a warning is displayed if the label is actually expanded git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4464 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/script.cpp b/Source/script.cpp index be14c182..cb161952 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3277,11 +3277,18 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) else wsprintf(str, "Nullsoft Install System %s", CONST_STR(NSIS_VERSION)); + short old_width = td.GetItem(IDC_VERSTR)->sWidth; + 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; } + + if (td.GetItem(IDC_VERSTR)->sWidth > old_width) + { + warning_fl("BrandingText: \"%s\" is too long, trimming has expanded the label", str); + } } DWORD dwSize;