a little bit more TCHARs and minor fixes

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6042 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-03-29 15:32:24 +00:00
parent acf9a8c21f
commit f4f18f9469
7 changed files with 29 additions and 16 deletions

View file

@ -2825,7 +2825,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (s == 0)
datebuf[0]=0;
else
datebuf[max(s,sizeof(datebuf)-1)]=0;
datebuf[max(s,_countof(datebuf)-1)]=0;
value=datebuf;
} else if (!_tcsicmp(define,_T("/file")) || !_tcsicmp(define,_T("/file_noerr"))) {
@ -3139,7 +3139,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
for (;;)
{
str[0]=0;
fgets(str,sizeof(str),fp);
_fgetts(str,_countof(str),fp);
if (!str[0]) break; // eof
TCHAR *p=str;