Skip to content

Commit

Permalink
improve stdlib is_bounced function (no bytecode changes)
Browse files Browse the repository at this point in the history
  • Loading branch information
rise1507 committed Jul 5, 2024
1 parent cf4cc4f commit 2cb4b84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/imports/stdlib.fc
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ builder store_msg_flags_and_address_none(builder b, int msg_flags) inline {
}
;;; @param `msg_flags` - 4-bit
int is_bounced(int msg_flags) inline {
return msg_flags & 1;
return msg_flags & 1 == 1;
}

(slice, ()) ~skip_bounced_prefix(slice s) inline {
Expand Down
2 changes: 1 addition & 1 deletion contracts/multisig.func
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int validate_dictionary_sequence(cell dict) impure inline {
() recv_internal(int balance, int msg_value, cell in_msg_full, slice in_msg_body) {
slice in_msg_full_slice = in_msg_full.begin_parse();
int msg_flags = in_msg_full_slice~load_msg_flags();
if (is_bounced(msg_flags)) {
if (msg_flags & 1) { ;; is bounced
return ();
}
slice sender_address = in_msg_full_slice~load_msg_addr();
Expand Down
2 changes: 1 addition & 1 deletion contracts/order.func
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ slice get_text_comment(slice in_msg_body) impure inline {
() recv_internal(int balance, int msg_value, cell in_msg_full, slice in_msg_body) {
slice in_msg_full_slice = in_msg_full.begin_parse();
int msg_flags = in_msg_full_slice~load_msg_flags();
if (is_bounced(msg_flags)) {
if (msg_flags & 1) { ;; is bounced
return ();
}
slice sender_address = in_msg_full_slice~load_msg_addr();
Expand Down

0 comments on commit 2cb4b84

Please sign in to comment.