Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/java_bytecode/java_string_library_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -902,10 +902,11 @@ void java_string_library_preprocesst::code_assign_java_string_to_string_expr(
// Although we should not reach this code if rhs is null, the association
// `pointer -> length` is added to the solver anyway, so we have to make sure
// the length is set to something reasonable.
const auto rhs_length = if_exprt(
auto rhs_length = if_exprt(
equal_exprt(rhs, null_pointer_exprt(to_pointer_type(rhs.type()))),
from_integer(0, lhs.length().type()),
get_length(deref, symbol_table));
rhs_length.set(ID_mode, ID_java);

// Assignments
code.add(code_assignt(lhs.length(), rhs_length), loc);
Expand Down