diff options
Diffstat (limited to 'libbuild2')
-rw-r--r-- | libbuild2/utility.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx index 193610f..f7f3d41 100644 --- a/libbuild2/utility.cxx +++ b/libbuild2/utility.cxx @@ -603,6 +603,7 @@ namespace build2 { const char* b (s.c_str ()); char* e (nullptr); + errno = 0; // We must clear it according to POSIX. uint64_t v (strtoull (b, &e, 10)); // Can't throw. if (errno != ERANGE && e == b + s.size () && v <= max_num) |