diff options
Diffstat (limited to 'miasm2/expression/modint.py')
| -rw-r--r-- | miasm2/expression/modint.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm2/expression/modint.py b/miasm2/expression/modint.py index 72757e75..76896eb9 100644 --- a/miasm2/expression/modint.py +++ b/miasm2/expression/modint.py @@ -67,9 +67,9 @@ class moduint(object): def __mod__(self, y): if isinstance(y, moduint): cls = self.maxcast(y) - return cls(self.arg % y.arg) + return cls(self.arg - (y.arg * int(float(self.arg)/y.arg))) else: - return self.__class__(self.arg % y) + return self.__class__(self.arg - (y * int(float(self.arg)/y))) def __mul__(self, y): if isinstance(y, moduint): |