use NSIS_MAX_STRLEN-1 instead of 1023 for FileRead limit
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4460 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
7a4bdcf90f
commit
c3bf6a68a7
1 changed files with 4 additions and 1 deletions
|
@ -5162,7 +5162,10 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
ent.which=EW_FGETS;
|
||||
ent.offsets[0]=GetUserVarIndex(line, 1); // file handle
|
||||
ent.offsets[1]=GetUserVarIndex(line, 2); // output string
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3)[0]?line.gettoken_str(3):"1023");
|
||||
if (line.gettoken_str(3)[0])
|
||||
ent.offsets[2]=add_string(line.gettoken_str(3));
|
||||
else
|
||||
ent.offsets[2]=add_intstring(NSIS_MAX_STRLEN-1);
|
||||
if (ent.offsets[0]<0 || ent.offsets[1]<0) PRINTHELP()
|
||||
SCRIPT_MSG("FileRead: %s->%s (max:%s)\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3));
|
||||
return add_entry(&ent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue