fix !appendfile writing null bytes on linux and breaking LogicLib ${Switch} statements

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6738 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2016-04-03 05:47:59 +00:00
parent 7a958101d8
commit d5662388a3

View file

@ -130,9 +130,9 @@ size_t CharEncConv::GuessOutputSize(size_t cbConverted)
if (!cch) return 0;
switch(cus)
{
case 1: zt = !!((char*)m_Result)[--cch]; break;
case 2: zt = !!((WORD*)m_Result)[--cch]; break;
case 4: zt = !!((UINT32*)m_Result)[--cch]; break;
case 1: zt = !((char*)m_Result)[--cch]; break;
case 2: zt = !((WORD*)m_Result)[--cch]; break;
case 4: zt = !((UINT32*)m_Result)[--cch]; break;
}
return (cch + (zt ? 0 : 1)) * cus;
}