summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-11-20 12:03:23 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-11-20 12:03:23 +0000
commit44833817233272a3e128979cbebb5cc74ba23b6d (patch)
treec354888aff8b258a274b48b52ea16681893bcfcd
parent8994ac249f4cd46a0285d7bd9af19305fbdadb54 (diff)
Check for end prior to checking for whitespace.
-rw-r--r--searchlib/src/vespa/searchlib/fef/indexproperties.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
index 659c7d2c8cc..1551b63316c 100644
--- a/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
+++ b/searchlib/src/vespa/searchlib/fef/indexproperties.cpp
@@ -55,7 +55,7 @@ lookupUint32(const Properties &props, const vespalib::string &name, uint32_t def
const auto & valS = p.get();
const char * start = valS.c_str();
const char * end = start + valS.size();
- while (isspace(start[0]) && start != end) { start++; }
+ while ((start != end) && isspace(start[0])) { start++; }
std::from_chars(start, end, value);
}
return value;