aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests
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 /tests/unit_tests
parentMerge pull request #6405 (diff)
downloadmonero-f9441c5759ce2609cd521c9343ff74b385980633.tar.xz
Fixed string_ref usage bug in epee::from_hex::vector
Diffstat (limited to 'tests/unit_tests')
-rw-r--r--tests/unit_tests/epee_utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit_tests/epee_utils.cpp b/tests/unit_tests/epee_utils.cpp
index 42bbb26bb..4f42140b3 100644
--- a/tests/unit_tests/epee_utils.cpp
+++ b/tests/unit_tests/epee_utils.cpp
@@ -841,6 +841,9 @@ TEST(HexLocale, String)
// decoding it this way also, ignoring spaces and colons between the numbers
hex.assign("00:ff 0f:f0");
EXPECT_EQ(source, epee::from_hex_locale::to_vector(hex));
+
+ hex.append("f0");
+ EXPECT_EQ(source, epee::from_hex_locale::to_vector(boost::string_ref{hex.data(), hex.size() - 2}));
}
TEST(ToHex, Array)