aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/variable.cxx')
-rw-r--r--libbuild2/variable.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/libbuild2/variable.cxx b/libbuild2/variable.cxx
index d16fcb4..206eb54 100644
--- a/libbuild2/variable.cxx
+++ b/libbuild2/variable.cxx
@@ -491,7 +491,13 @@ namespace build2
{
// May throw invalid_argument or out_of_range.
//
- return stoull (n.value);
+ size_t i;
+ uint64_t r (stoull (n.value, &i));
+
+ if (i == n.value.size ())
+ return r;
+
+ // Fall through.
}
catch (const std::exception&)
{