From c3bf6a68a72d0d04d1162c36d6105c5b7f34390e Mon Sep 17 00:00:00 2001 From: kichik Date: Tue, 27 Dec 2005 19:22:56 +0000 Subject: [PATCH] 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 --- Source/script.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/script.cpp b/Source/script.cpp index b0577c90..be14c182 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -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);