瀏覽代碼

chat.c: fix format argument type

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf 11 年之前
父節點
當前提交
ae0c43a0e3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/chat/chat.c

+ 1 - 1
examples/chat/chat.c

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