Skip to content

Commit

Permalink
refactor: Avoid passing iterators to UCharCast
Browse files Browse the repository at this point in the history
When compiling with MSVC, `std::array<T,N>::iterator` is equivalent to
`std::_Array_iterator<T,N>`, which cannot be handled by any `UCharCast`
overload.
  • Loading branch information
hebasto committed Mar 30, 2024
1 parent 5a4f7b9 commit de38d19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/fuzz/util/descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void MockedDescriptorConverter::Init() {
// an extended one.
if (IdIsCompPubKey(i) || IdIsUnCompPubKey(i) || IdIsXOnlyPubKey(i) || IdIsConstPrivKey(i)) {
CKey privkey;
privkey.Set(UCharCast(key_data.begin()), UCharCast(key_data.end()), !IdIsUnCompPubKey(i));
privkey.Set(UCharCast(key_data.data()), UCharCast(key_data.data()) + 32, !IdIsUnCompPubKey(i));
if (IdIsCompPubKey(i) || IdIsUnCompPubKey(i)) {
CPubKey pubkey{privkey.GetPubKey()};
keys_str[i] = HexStr(pubkey);
Expand Down

0 comments on commit de38d19

Please sign in to comment.