Skip to content
Snippets Groups Projects
Commit fab82035 authored by David Bühler's avatar David Bühler
Browse files

[Eva] Bitwise domain: checks that the right argument of shifts is positive.

parent 97a618fb
No related branches found
No related tags found
No related merge requests found
......@@ -300,7 +300,7 @@ let shift ~size ~signed offsm shift_direction n =
then signed_default ~size ~size_offsm:size offsm
else default size
in
if Int.ge n size
if Int.lt n Int.zero || Int.ge n size
then result (* Undefined behavior: we don't care about the result. *)
else
let size_copy = Int.sub size n in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment