From 8cf1322a6fd5ae282d8a09fdba634f27a1a88560 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 25 May 2020 01:24:37 +0100 Subject: fix(3p/nix/libstore): Fix error condition when parsing generations --- third_party/nix/src/libstore/profiles.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/nix') diff --git a/third_party/nix/src/libstore/profiles.cc b/third_party/nix/src/libstore/profiles.cc index 3516954b50..53e6487995 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; } -- cgit 1.4.1