implemented RFE #1669513 - bitwise operators for !define /math

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4959 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-02-27 21:04:12 +00:00
parent b8bf22affb
commit 695fddbc32
3 changed files with 8 additions and 2 deletions

View file

@ -2795,6 +2795,12 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
sprintf(value,"%d",value1-value2);
} else if (!strcmp(mathop,"*")) {
sprintf(value,"%d",value1*value2);
} else if (!strcmp(mathop,"&")) {
sprintf(value,"%d",value1&value2);
} else if (!strcmp(mathop,"|")) {
sprintf(value,"%d",value1|value2);
} else if (!strcmp(mathop,"^")) {
sprintf(value,"%d",value1^value2);
} else if (!strcmp(mathop,"/")) {
if (value2==0) {
ERROR_MSG("!define /math: division by zero! (\"%i / %i\")\n",value1,value2);