uri remainder

This commit is contained in:
wowario 2023-02-12 12:58:49 +03:00
parent d1441bc034
commit eff55d073c
No known key found for this signature in database
GPG Key ID: 793504B449C69220
1 changed files with 2 additions and 2 deletions

View File

@ -14768,13 +14768,13 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay
//----------------------------------------------------------------------------------------------------
bool wallet2::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error)
{
if (uri.substr(0, 7) != "wownero:")
if (uri.substr(0, 8) != "wownero:")
{
error = std::string("URI has wrong scheme (expected \"wownero:\"): ") + uri;
return false;
}
std::string remainder = uri.substr(7);
std::string remainder = uri.substr(8);
const char *ptr = strchr(remainder.c_str(), '?');
address = ptr ? remainder.substr(0, ptr-remainder.c_str()) : remainder;