mirror of
https://github.com/bitcoin/bips.git
synced 2026-06-01 17:15:27 +00:00
Merge pull request #2093 from yyhrnk/fix/txfs-index-bounds
BIP-346: correct TxFieldSelector index upper bound
This commit is contained in:
@@ -174,7 +174,7 @@ fn parse_inout_selection(
|
|||||||
(current_input_idx as isize + rel) as usize
|
(current_input_idx as isize + rel) as usize
|
||||||
};
|
};
|
||||||
|
|
||||||
if idx > nb_items {
|
if idx >= nb_items {
|
||||||
return Err("selected index out of bounds");
|
return Err("selected index out of bounds");
|
||||||
}
|
}
|
||||||
if let Some(last) = selected.last() {
|
if let Some(last) = selected.last() {
|
||||||
|
|||||||
Reference in New Issue
Block a user