Commit 4468ed58 authored by John Zhang's avatar John Zhang

Fixed integer left shift overflow detection problem by assering the range of r.

parent 77fdbdc8
......@@ -105,6 +105,8 @@ def _leftShift(ivkbl, frame, interpreter):
l = left.get_embedded_integer()
r = right.get_embedded_integer()
if not (l == 0 or 0 <= r <= 63):
raise OverflowError
result = ovfcheck(l << r)
except OverflowError:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment