aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2020-02-28 17:42:28 -0500
committerLee Clagett <code@leeclagett.com>2020-03-30 16:53:34 +0000
commitf9441c5759ce2609cd521c9343ff74b385980633 (patch)
treef25239ad4a578f2a96ac73cb7d525c84223cd35d /contrib/epee
parentMerge pull request #6405 (diff)
downloadmonero-f9441c5759ce2609cd521c9343ff74b385980633.tar.xz
Fixed string_ref usage bug in epee::from_hex::vector
Diffstat (limited to 'contrib/epee')
-rw-r--r--contrib/epee/src/hex.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/epee/src/hex.cpp b/contrib/epee/src/hex.cpp
index b25ce5421..b53efe6b8 100644
--- a/contrib/epee/src/hex.cpp
+++ b/contrib/epee/src/hex.cpp
@@ -141,7 +141,7 @@ namespace epee
result.reserve(count / 2);
// the data to work with (std::string is always null-terminated)
- auto data = src.data();
+ auto data = src.begin();
// convert a single hex character to an unsigned integer
auto char_to_int = [](const char *input) {
@@ -167,9 +167,9 @@ namespace epee
};
// keep going until we reach the end
- while (data[0] != '\0') {
+ while (data != src.end()) {
// skip unwanted characters
- if (!include(data[0])) {
+ if (!include(*data)) {
++data;
continue;
}