about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/attr-path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/attr-path.cc')
-rw-r--r--third_party/nix/src/libexpr/attr-path.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/nix/src/libexpr/attr-path.cc b/third_party/nix/src/libexpr/attr-path.cc
index 628b58c1b1e3..5f14fca21493 100644
--- a/third_party/nix/src/libexpr/attr-path.cc
+++ b/third_party/nix/src/libexpr/attr-path.cc
@@ -1,5 +1,7 @@
 #include "attr-path.hh"
 
+#include <absl/strings/numbers.h>
+
 #include "eval-inline.hh"
 #include "util.hh"
 
@@ -50,7 +52,7 @@ Value* findAlongAttrPath(EvalState& state, const std::string& attrPath,
     /* Is i an index (integer) or a normal attribute name? */
     enum { apAttr, apIndex } apType = apAttr;
     unsigned int attrIndex;
-    if (string2Int(attr, attrIndex)) {
+    if (absl::SimpleAtoi(attr, &attrIndex)) {
       apType = apIndex;
     }