Skip to content

Commit

Permalink
Merge pull request NixOS#9408 from roblabla/fix-bad-format-string
Browse files Browse the repository at this point in the history
Fix bad_format_string error when builder stdout contains %
  • Loading branch information
edolstra authored Nov 20, 2023
2 parents e29e952 + e2b6821 commit f450c87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libutil/serialise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Error readError(Source & source)
auto msg = readString(source);
ErrorInfo info {
.level = level,
.msg = hintformat(fmt("%s", msg)),
.msg = hintfmt(msg),
};
auto havePos = readNum<size_t>(source);
assert(havePos == 0);
Expand All @@ -457,7 +457,7 @@ Error readError(Source & source)
havePos = readNum<size_t>(source);
assert(havePos == 0);
info.traces.push_back(Trace {
.hint = hintformat(fmt("%s", readString(source)))
.hint = hintfmt(readString(source))
});
}
return Error(std::move(info));
Expand Down

0 comments on commit f450c87

Please sign in to comment.