Commit 9ec6c57a authored by Stefan Behnel's avatar Stefan Behnel

fix result type of integer division in overflow test for unsigned int types

parent 26f60d66
......@@ -141,11 +141,11 @@ cpdef format(INT value):
return "max_value"
elif value == half_:
return "half"
elif max_value_ - value <= max_value_ // 4:
elif max_value_ - value <= max_value_ // <INT>4:
return "half + half - %s" % (half_ + half_ - value)
elif max_value_ - value <= half_:
return "half + %s" % (value - half_)
elif max_value_ - value <= half_ + max_value_ // 4:
elif max_value_ - value <= half_ + max_value_ // <INT>4:
return "half - %s" % (half_ - value)
else:
return "%s" % value
......
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