Commit fd5a3b58 authored by Max Kellermann's avatar Max Kellermann

client/Response: reimplement Error() without FmtError()

With libfmt versions older than 7, this leads to an endless recursion between Error() and FmtError(), resulting in a crash due to stack overflow. D'oh! Closes https://github.com/MusicPlayerDaemon/MPD/issues/1295
parent 6120c136
ver 0.23.2 (not yet released)
* neighbor
- mention failed plugin name in error message
* fix crash with libfmt versions older than 7
ver 0.23.1 (2021/10/19)
* protocol
......
......@@ -66,7 +66,11 @@ Response::WriteBinary(ConstBuffer<void> payload) noexcept
void
Response::Error(enum ack code, const char *msg) noexcept
{
FmtError(code, FMT_STRING("{}"), msg);
Fmt(FMT_STRING("ACK [{}@{}] {{{}}} "),
(int)code, list_index, command);
Write(msg);
Write("\n");
}
void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment