diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/descriptor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp index 5fa128d62d..6c5961f60e 100644 --- a/src/script/descriptor.cpp +++ b/src/script/descriptor.cpp @@ -826,7 +826,8 @@ std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<c } if (origin_split.size() == 1) return ParsePubkeyInner(key_exp_index, origin_split[0], permit_uncompressed, out, error); if (origin_split[0].size() < 1 || origin_split[0][0] != '[') { - error = strprintf("Key origin start '[ character expected but not found, got '%c' instead", origin_split[0][0]); + error = strprintf("Key origin start '[ character expected but not found, got '%c' instead", + origin_split[0].size() < 1 ? /** empty, implies split char */ ']' : origin_split[0][0]); return nullptr; } auto slash_split = Split(origin_split[0].subspan(1), '/'); |