summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-01-20 20:41:51 +0100
committerMax Kellermann <max@musicpd.org>2021-01-20 20:44:47 +0100
commit9551166f2795238cda1089dc7de2ff02ec1dcce4 (patch)
treebf0595ab219709374785723f33ff2f16e5f5da20 /src
parent2a8c420cff6844266bccc444af061027164f3403 (diff)
command/file: use %zu to format a size_t
`PRIoffset` was wrong, because it expects an `offset_type` (i.e. `uint64_t`). This broke on 32 bit machines where `size_t` has 32 bits. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1058
Diffstat (limited to 'src')
-rw-r--r--src/command/FileCommands.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx
index e50e3324d..dc68463aa 100644
--- a/src/command/FileCommands.cxx
+++ b/src/command/FileCommands.cxx
@@ -296,7 +296,7 @@ public:
return;
}
- response.Format("size: %" PRIoffset "\n", buffer.size);
+ response.Format("size: %zu\n", buffer.size);
if (mime_type != nullptr)
response.Format("type: %s\n", mime_type);