Skip to content

Commit

Permalink
nixos-option: fix expression position calculation
Browse files Browse the repository at this point in the history
This was causing null pointer dereferences. Pattern copied from Nix
source code.
  • Loading branch information
emilazy committed Jul 13, 2023
1 parent ee5e438 commit 775f683
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/tools/nix/nixos-option/nixos-option.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy

Value evaluateValue(Context & ctx, Value & v)
{
ctx.state.forceValue(v, v.attrs->pos);
ctx.state.forceValue(v, [&]() { return v.determinePos(nix::noPos); });
if (ctx.autoArgs.empty()) {
return v;
}
Expand Down

0 comments on commit 775f683

Please sign in to comment.