Skip to content

Commit

Permalink
fix #938: crash in asm mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Sep 25, 2023
1 parent dd3e2cf commit a5f6717
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ static StateValue bytesToValue(const Memory &m, const vector<Byte> &bytes,
val = toType.fromInt(val.trunc(bitsize, toType.np_bits(true)));

// allow ptr->int type punning in Assembly mode
if (bitsize == bits_ptr_address &&
if (bitsize == bits_program_pointer &&
m.getState().getFn().getFnAttrs().has(FnAttrs::Asm)) {
StateValue ptr_val = bytesToValue(m, bytes, PtrType(0));
ptr_val.value = Pointer(m, ptr_val.value).getAddress();
Expand Down

0 comments on commit a5f6717

Please sign in to comment.