Skip to content

Commit f450c87

Browse files
authored
Merge pull request #9408 from roblabla/fix-bad-format-string
Fix bad_format_string error when builder stdout contains %
2 parents e29e952 + e2b6821 commit f450c87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libutil/serialise.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ Error readError(Source & source)
448448
auto msg = readString(source);
449449
ErrorInfo info {
450450
.level = level,
451-
.msg = hintformat(fmt("%s", msg)),
451+
.msg = hintfmt(msg),
452452
};
453453
auto havePos = readNum<size_t>(source);
454454
assert(havePos == 0);
@@ -457,7 +457,7 @@ Error readError(Source & source)
457457
havePos = readNum<size_t>(source);
458458
assert(havePos == 0);
459459
info.traces.push_back(Trace {
460-
.hint = hintformat(fmt("%s", readString(source)))
460+
.hint = hintfmt(readString(source))
461461
});
462462
}
463463
return Error(std::move(info));

0 commit comments

Comments
 (0)