aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-04-21 08:38:21 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-04-21 08:38:21 -0500
commit06c81b6527be94c66a31a0ec23c56c5a2d602b69 (patch)
tree203f8daecbea5c41a63b55470baeeaeefb189922 /contrib
parentMerge pull request #6332 (diff)
parentFixed string_ref usage bug in epee::from_hex::vector (diff)
downloadmonero-06c81b6527be94c66a31a0ec23c56c5a2d602b69.tar.xz
Merge pull request #6359
f9441c5 Fixed string_ref usage bug in epee::from_hex::vector (vtnerd)
Diffstat (limited to 'contrib')
-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;
}