From 51e2b07f05ff97eb3dce78940229389004375b88 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 15 Aug 2013 21:22:17 +0000 Subject: [PATCH] Fixed bug #1079, broken !define Unicode null terminator git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6409 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/history.but | 2 ++ Source/script.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Docs/src/history.but b/Docs/src/history.but index 47c49440..d89d5af6 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -18,6 +18,8 @@ Released on ? \b FileReadByte no longer performs a Unicode conversion on non-ASCII characters +\b Fixed !define Unicode null terminator bug (\W{http://sf.net/p/nsis/bugs/1079/}{bug #1079}) + \b Fixed MakeNSISW default pushbutton and tab order \H{v3.0a1} 3.0 Alpha 1 diff --git a/Source/script.cpp b/Source/script.cpp index 1aba0adc..8bb4fac4 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3121,7 +3121,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) } } define = line.gettoken_str(2); - file_buf.add(_T("\0"),1); + file_buf.add(_T("\0"),sizeof(TCHAR)); value = (TCHAR *)file_buf.get(); } else if (!_tcsicmp(define,_T("/math"))) {