From 1080a90d23215399456ff45ab2cf34119c9fa20a Mon Sep 17 00:00:00 2001 From: wowario Date: Sun, 12 Feb 2023 12:58:49 +0300 Subject: [PATCH] uri remainder --- src/wallet/wallet2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b11598125..3c48ec0f6 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -14035,13 +14035,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 &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;