Skip to content

Commit 36e4e19

Browse files
Correct bound on prevWith
Co-authored-by: John Ericson <[email protected]>
1 parent 31ee8b0 commit 36e4e19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libexpr/nixexpr.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ void ExprWith::bindVars(EvalState & es, const std::shared_ptr<const StaticEnv> &
523523
prevWith = 0;
524524
for (curEnv = env.get(), level = 1; curEnv; curEnv = curEnv->up.get(), level++)
525525
if (curEnv->isWith) {
526-
assert(level < std::numeric_limits<uint32_t>::max());
526+
assert(level <= std::numeric_limits<uint32_t>::max());
527527
prevWith = level;
528528
break;
529529
}

0 commit comments

Comments
 (0)