From 26ff9c1b37b67ba675412cda98744b33e5cfd7cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 17 Feb 2023 15:34:52 +0100 Subject: [PATCH] Revert "Shut up a gcc warning" This reverts commit 37b4a9ec66a507484132331c8dd9d34c4c9c5778. This doesn't handle the case where there is no slash. --- src/libexpr/paths.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 61c4d4100..e1c2740cb 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -40,7 +40,6 @@ SourcePath EvalState::decodePath(std::string_view s, PosIdx pos) try { auto slash = s.find('/'); - if (slash > 20) throw std::invalid_argument(""); size_t number = std::stoi(std::string(s.substr(0, slash)), nullptr, 16); s = slash == s.npos ? "" : s.substr(slash);