From 4c29550d0479eb79923f6692838cfa043db5db85 Mon Sep 17 00:00:00 2001 From: anders_k Date: Thu, 8 Oct 2020 00:25:32 +0000 Subject: [PATCH] Fixed Unicode compiler crash (bug #1254, patch #300) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7224 212acab6-be3b-0410-9dea-997c60f758d6 --- Docs/src/history.but | 2 ++ Source/strlist.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Docs/src/history.but b/Docs/src/history.but index eba90b45..fc32fa41 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -18,6 +18,8 @@ Unicode is the now default. \b Added nsExec /MBCS switch +\b Fixed Unicode compiler crash (\W{http://sf.net/p/nsis/bugs/1254}{bug #1254}, \W{http://sf.net/p/nsis/patches/300}{patch #300}) + \S2{} Translations \b Updated Corsican\#{(forum)} and Japanese (maboroshin PR\#{github.com/maboroshin}) diff --git a/Source/strlist.cpp b/Source/strlist.cpp index d299f5d7..bb45e9e1 100644 --- a/Source/strlist.cpp +++ b/Source/strlist.cpp @@ -43,7 +43,7 @@ unsigned int ExeHeadStringList::getnum() const for(;;) { if ((pos+=cb) >= cbList) break; - cb = StrLenUTF16(p+=cb) + 1, ++num; + cb = (StrLenUTF16(p+=cb) + 1) * 2, ++num; } } else