about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--third_party/nix/src/libstore/profiles.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc
index 3516954b50b7..53e64879954b 100644
--- a/third_party/nix/src/libstore/profiles.cc
+++ b/third_party/nix/src/libstore/profiles.cc
@@ -31,7 +31,7 @@ static int parseName(absl::string_view profileName, absl::string_view name) {
   }
 
   int n;
-  if (!absl::SimpleAtoi(name, &n) && n < 0) {
+  if (!absl::SimpleAtoi(name, &n) || n < 0) {
     return -1;
   }