Skip to content

Commit

Permalink
Update base_layer/wallet_ffi/src/lib.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Stan Bondi <sdbondi@users.noreply.github.com>
  • Loading branch information
Cifko and sdbondi authored May 19, 2022
1 parent 1e17efd commit e0d14ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base_layer/wallet_ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6537,8 +6537,8 @@ pub unsafe extern "C" fn fee_per_gram_stats_get_at(
ptr::swap(error_out, &mut error as *mut c_int);
return ptr::null_mut();
}
let len = fee_per_gram_stats_get_length(fee_per_gram_stats, error_out) as c_int - 1;
if len < 0 || position > len as c_uint {
let len = fee_per_gram_stats_get_length(fee_per_gram_stats, error_out);
if len == 0 || position > len - 1 {
error = LibWalletError::from(InterfaceError::PositionInvalidError).code;
ptr::swap(error_out, &mut error as *mut c_int);
return ptr::null_mut();
Expand Down

0 comments on commit e0d14ac

Please sign in to comment.