1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

Revert "Shut up a gcc warning"

This reverts commit 37b4a9ec66. This
doesn't handle the case where there is no slash.
This commit is contained in:
Eelco Dolstra 2023-02-17 15:34:52 +01:00
parent 02d5c54555
commit 26ff9c1b37

View file

@ -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);