aboutsummaryrefslogtreecommitdiff
path: root/interpreter/ElymasGlobal.pm
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2015-04-11 00:59:04 +0200
committerDrahflow <drahflow@gmx.de>2015-04-11 00:59:04 +0200
commit3e22eb797f02cdb54a5eccc8c6ebce33e1e1d7d5 (patch)
treea3683561e3ca0edc0e431a8aa142b86842db27a8 /interpreter/ElymasGlobal.pm
parentf0a883a15138991e09d4657b7d2aab491dafbc7b (diff)
Sane handling of integer division
Diffstat (limited to 'interpreter/ElymasGlobal.pm')
-rw-r--r--interpreter/ElymasGlobal.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/interpreter/ElymasGlobal.pm b/interpreter/ElymasGlobal.pm
index 61d32c4..4080661 100644
--- a/interpreter/ElymasGlobal.pm
+++ b/interpreter/ElymasGlobal.pm
@@ -778,6 +778,8 @@ installGlobal2IntFunction('sub', '$a - $b');
installGlobal2IntFunction('mul', '$a * $b');
installGlobal2IntFunction('div', 'int($a / $b)');
installGlobal2IntFunction('mod', '$a % $b');
+installGlobal2IntFunction('udiv', 'int($a / $b)'); # cheap compatibility hack
+installGlobal2IntFunction('umod', '$a % $b'); # cheap compatibility hack
installGlobal2IntFunction('and', '($a and $b)? 1: 0');
installGlobal2IntFunction('nand', '($a and $b)? 0: 1');