From d922dfc6ad40d789e441cb93c1ff479385cc93a0 Mon Sep 17 00:00:00 2001 From: Felix von Oertzen Date: Wed, 13 Nov 2024 08:53:13 +0100 Subject: [PATCH] fixed wrong cast and sprintf format control sequence --- src/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event.c b/src/event.c index b319258..77503d8 100644 --- a/src/event.c +++ b/src/event.c @@ -98,7 +98,7 @@ zlog_event_t *zlog_event_new(int time_cache_count) a_event->tid = pthread_self(); a_event->tid_str_len = sprintf(a_event->tid_str, "%lu", (unsigned long)a_event->tid); - a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "%x", (unsigned int)a_event->tid); + a_event->tid_hex_str_len = sprintf(a_event->tid_hex_str, "%lx", (unsigned long)a_event->tid); #ifdef __linux__ a_event->ktid = syscall(SYS_gettid);