From 679b3bc00f851c1511eed7f944209cf096f87657 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 28 May 2021 18:00:55 +0200 Subject: [PATCH] output/print, command/player: print bool as integer Fixes protocol breakage after commit 0440c41cbac0857eaab1220e3b0852c61bfc794a libfmt is too clever for the MPD protocol! Closes https://github.com/MusicPlayerDaemon/MPD/issues/1175 --- src/command/PlayerCommands.cxx | 6 +++--- src/output/Print.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/command/PlayerCommands.cxx b/src/command/PlayerCommands.cxx index 3bc867f1c..23dbeac6a 100644 --- a/src/command/PlayerCommands.cxx +++ b/src/command/PlayerCommands.cxx @@ -144,10 +144,10 @@ handle_status(Client &client, [[maybe_unused]] Request args, Response &r) COMMAND_STATUS_PLAYLIST_LENGTH ": {}\n" COMMAND_STATUS_MIXRAMPDB ": {}\n" COMMAND_STATUS_STATE ": {}\n"), - playlist.GetRepeat(), - playlist.GetRandom(), + (unsigned)playlist.GetRepeat(), + (unsigned)playlist.GetRandom(), SingleToString(playlist.GetSingle()), - playlist.GetConsume(), + (unsigned)playlist.GetConsume(), partition.name.c_str(), playlist.GetVersion(), playlist.GetLength(), diff --git a/src/output/Print.cxx b/src/output/Print.cxx index cd59b91df..d495b4968 100644 --- a/src/output/Print.cxx +++ b/src/output/Print.cxx @@ -40,7 +40,7 @@ printAudioDevices(Response &r, const MultipleOutputs &outputs) "outputenabled: {}\n"), i, ao.GetName(), ao.GetPluginName(), - ao.IsEnabled()); + (unsigned)ao.IsEnabled()); for (const auto &[attribute, value] : ao.GetAttributes()) r.Fmt(FMT_STRING("attribute: {}={}\n"),