Added <<, >> and >>> !define /math operations
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6199 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
67d0b165b1
commit
dca62fbbc7
3 changed files with 8 additions and 2 deletions
|
@ -3062,6 +3062,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
|||
_stprintf(value,_T("%d"),value1|value2);
|
||||
} else if (!_tcscmp(mathop,_T("^"))) {
|
||||
_stprintf(value,_T("%d"),value1^value2);
|
||||
} else if (!_tcscmp(mathop,_T("<<")) || !_tcscmp(mathop,_T("<<<")) ) {
|
||||
_stprintf(value,_T("%d"),value1<<value2);
|
||||
} else if (!_tcscmp(mathop,_T(">>"))) {
|
||||
_stprintf(value,_T("%d"),(signed)value1>>(signed)value2);
|
||||
} else if (!_tcscmp(mathop,_T(">>>"))) {
|
||||
_stprintf(value,_T("%d"),(unsigned)value1>>(unsigned)value2);
|
||||
} else if (!_tcscmp(mathop,_T("/"))) {
|
||||
if (value2==0) {
|
||||
ERROR_MSG(_T("!define /math: division by zero! (\"%i / %i\")\n"),value1,value2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue