From 3e22eb797f02cdb54a5eccc8c6ebce33e1e1d7d5 Mon Sep 17 00:00:00 2001 From: Drahflow Date: Sat, 11 Apr 2015 00:59:04 +0200 Subject: Sane handling of integer division --- interpreter/ElymasGlobal.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'interpreter') 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'); -- cgit v1.2.3