diff options
| author | Drahflow <drahflow@gmx.de> | 2015-04-11 00:59:04 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2015-04-11 00:59:04 +0200 |
| commit | 3e22eb797f02cdb54a5eccc8c6ebce33e1e1d7d5 (patch) | |
| tree | a3683561e3ca0edc0e431a8aa142b86842db27a8 /interpreter | |
| parent | f0a883a15138991e09d4657b7d2aab491dafbc7b (diff) | |
Sane handling of integer division
Diffstat (limited to 'interpreter')
| -rw-r--r-- | interpreter/ElymasGlobal.pm | 2 |
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'); |
