From edaf5136db5f14c1a1595c4c6a9a82ea22548aca Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Mon, 6 Feb 2023 15:08:29 +0000 Subject: - Improve sanity checking of input to distance-to-path feature. - Keep comment --- document/src/vespa/document/select/parse_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'document') diff --git a/document/src/vespa/document/select/parse_utils.cpp b/document/src/vespa/document/select/parse_utils.cpp index 80ee4ef9dfb..2e85f81f089 100644 --- a/document/src/vespa/document/select/parse_utils.cpp +++ b/document/src/vespa/document/select/parse_utils.cpp @@ -9,6 +9,8 @@ namespace document::select::util { // Note: these parsers are all pure, reentrant and without locking. bool parse_hex_i64(const char* str, size_t len, int64_t& out) { + // Legacy parser parses hex numbers as u64 rather than i64 (then implicitly + // converts), so we do the same thing here to avoid change of semantics. uint64_t val = out; auto res = std::from_chars(str, str+len, val, 16); out = val; -- cgit v1.2.3