Skip to content

Commit 4a019f6

Browse files
committed
format(null-pointer expression) should print NULL or 0
1 parent 3e2302b commit 4a019f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/format_expr.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ static std::ostream &format_rec(
134134
return os << src.get_value();
135135
else if(type == ID_floatbv)
136136
return os << ieee_floatt(src);
137+
else if(type == ID_pointer && (src.is_zero() || src.get_value() == ID_NULL))
138+
return os << src.get_value();
137139
else
138140
return os << src.pretty();
139141
}

0 commit comments

Comments
 (0)