mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
Shut up a gcc warning
This commit is contained in:
parent
f4f0f8ae3f
commit
37b4a9ec66
1 changed files with 1 additions and 0 deletions
|
@ -40,6 +40,7 @@ SourcePath EvalState::decodePath(std::string_view s, PosIdx pos)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto slash = s.find('/');
|
auto slash = s.find('/');
|
||||||
|
if (slash > 20) throw std::invalid_argument("");
|
||||||
size_t number = std::stoi(std::string(s.substr(0, slash)), nullptr, 16);
|
size_t number = std::stoi(std::string(s.substr(0, slash)), nullptr, 16);
|
||||||
s = slash == s.npos ? "" : s.substr(slash);
|
s = slash == s.npos ? "" : s.substr(slash);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue