qemud: send message size in hexadecimal format

All sizes need to be printed in hexadecimal. Otherwise size of the
actual data doesn't match and messages are not processed inside the
container.
This commit is contained in:
Simon Fels 2017-01-20 07:29:35 +01:00
commit c199e519ba

View file

@ -71,7 +71,7 @@ void QemudMessageProcessor::process_commands() {
void QemudMessageProcessor::send_header(const size_t &size) {
char header[header_size + 1];
std::snprintf(header, header_size + 1, "%04lu", size);
std::snprintf(header, header_size + 1, "%04lx", size);
messenger_->send(header, header_size);
}