From 656ade8732a98d5b7b36446f1499a08393149898 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 9 Mar 2014 23:23:19 +0000 Subject: [PATCH] Don't store wide and narrow versions of the same error string git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6450 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/build.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/build.cpp b/Source/build.cpp index c793eac2..b6c7f3d7 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -444,8 +444,9 @@ void CEXEBuild::init_shellconstantvalues() { // see Source\exehead\util.c for implementation details // basically, it knows it needs to get folders from the registry when the 0x80 is on - ERROR_MSG(_T("Internal compiler error: too many strings added to strings block before adding shell constants!\n")); - throw out_of_range("Internal compiler error: too many strings added to strings block before adding shell constants!"); + const char* msg = "Internal compiler error: too many strings added to strings block before adding shell constants!"; + ERROR_MSG(_T("%") NPRINs, msg); + throw out_of_range(msg); } set_uninstall_mode(1); @@ -464,8 +465,9 @@ void CEXEBuild::init_shellconstantvalues() || uncf_def != cf_def || uncf64_def != cf64_def) { - ERROR_MSG(_T("Internal compiler error: installer's shell constants are different than uninstallers!\n")); - throw out_of_range("Internal compiler error: installer's shell constants are different than uninstallers!"); + const char* msg = "Internal compiler error: installer's shell constants are different than uninstallers!"; + ERROR_MSG(_T("%") NPRINs, msg); + throw out_of_range(msg); } }