Merge fd25d3493d into merged_master (Bitcoin PR bitcoin/bitcoin#24319)

This commit is contained in:
Byron Hambly 2023-06-30 15:07:15 +00:00
commit f9aca0e104
2 changed files with 1 additions and 2 deletions

View file

@ -93,7 +93,7 @@ std::string FormatScript(const CScript& script)
ret += strprintf("0x%x ", HexStr(std::vector<uint8_t>(it2, script.end())));
break;
}
return ret.substr(0, ret.size() - 1);
return ret.substr(0, ret.empty() ? ret.npos : ret.size() - 1);
}
const std::map<unsigned char, std::string> mapSigHashTypes = {