1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-09 03:22:45 +03:00

chat.c: fix format argument type

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf
2014-03-23 20:19:06 +01:00
parent 92fcd83da3
commit ae0c43a0e3

View File

@@ -105,7 +105,7 @@ static char *messages_to_json(long last_id)
// messages (it may be too small if the ringbuffer is full and all // messages (it may be too small if the ringbuffer is full and all
// messages are large. in this case asserts will trigger). // messages are large. in this case asserts will trigger).
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"{user: '%s', text: '%s', timestamp: %lu, id: %lu},", "{user: '%s', text: '%s', timestamp: %lu, id: %ld},",
message->user, message->text, message->timestamp, message->id); message->user, message->text, message->timestamp, message->id);
assert(len > 0); assert(len > 0);
assert((size_t) len < sizeof(buf)); assert((size_t) len < sizeof(buf));