Skip to content

Commit 939cec3

Browse files
Fix cast
1 parent 6426115 commit 939cec3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/analyses/baseInvariant.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct
106106
if M.tracing then M.tracel "inv" "Consider case of lval %a = %a" d_lval lv VD.pretty (Address (AD.singleton a));
107107
let st = set' lv (Address (AD.singleton a)) st in
108108
let old_val = get ~man st (AD.singleton a) None in
109-
let old_val = VD.cast (Cilfacade.typeOfLval lv) old_val in (* needed as the type of this pointer may be different *)
109+
let old_val = VD.cast (Cilfacade.typeOfLval x) old_val in (* needed as the type of this pointer may be different *)
110110
(* this what I would originally have liked to do, but eval_rv_lval_refine uses queries and thus stale values *)
111111
(* let old_val = eval_rv_lval_refine ~man st exp x in *)
112112
let old_val = map_oldval old_val (Cilfacade.typeOfLval x) in

0 commit comments

Comments
 (0)