소스 검색

[analyzer] do not replace locals if the type changes (closes #3964)

Simon Krajewski 10 년 전
부모
커밋
3c38602723
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      analyzer.ml

+ 1 - 1
analyzer.ml

@@ -1055,7 +1055,7 @@ module ConstPropagation = struct
 			begin try
 				let v' = Ssa.get_origin_var v in
 				begin match v'.v_extra with
-					| Some ([],_) -> get_block_depth v <= get_block_depth v0
+					| Some ([],_) -> get_block_depth v <= get_block_depth v0 && type_iseq v0.v_type v.v_type
 					| _ -> false
 				end
 			with Not_found ->