From 6271e879721bc3a1dfcde723ff783175f0116ce7 Mon Sep 17 00:00:00 2001 From: anders_k Date: Mon, 29 May 2017 13:12:41 +0000 Subject: [PATCH] SendMessage /TIMEOUT= parameter should not be case-sensitive. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6862 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index 8c9de8af..e464f062 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3267,24 +3267,18 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) ent.which=EW_SENDMESSAGE; if (line.gettoken_str(1)[0] == _T('/') || line.gettoken_str(2)[0] == _T('/') || line.gettoken_str(3)[0] == _T('/') || line.gettoken_str(4)[0] == _T('/')) - { PRINTHELP() - } SCRIPT_MSG(_T("SendMessage:")); int a=5; - ent.offsets[0]=GetUserVarIndex(line, 5); + ent.offsets[0]=GetUserVarIndex(line,a); if (ent.offsets[0]>=0) - { - SCRIPT_MSG(_T("(->%") NPRIs _T(")"),line.gettoken_str(5)); - a++; - } + SCRIPT_MSG(_T("(->%") NPRIs _T(")"),line.gettoken_str(a++)); - if (!_tcsncmp(line.gettoken_str(a),_T("/TIMEOUT="),9)) + if (!_tcsncicmp(line.gettoken_str(a),_T("/TIMEOUT="),9)) { - ent.offsets[5]|=_ttoi(line.gettoken_str(a)+9)<<2; + ent.offsets[5]|=_ttoi(line.gettoken_str(a++)+9)<<2; SCRIPT_MSG(_T(" (timeout=%d)"),ent.offsets[5]>>2); - a++; } if (line.getnumtokens()>a)