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
This commit is contained in:
Max Kellermann 2021-01-20 20:41:51 +01:00
parent 2a8c420cff
commit 9551166f27
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.22.4 (not yet released)
* protocol
- fix "readpicture" on 32 bit machines
* storage
- curl: fix several WebDAV protocol bugs
* decoder

View File

@ -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);