diff options
-rw-r--r-- | firmware/target/hosted/sdl/thread-sdl.c | 4 | ||||
-rw-r--r-- | firmware/thread.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/hosted/sdl/thread-sdl.c b/firmware/target/hosted/sdl/thread-sdl.c index 83f1d1960d..08f20367cc 100644 --- a/firmware/target/hosted/sdl/thread-sdl.c +++ b/firmware/target/hosted/sdl/thread-sdl.c @@ -670,9 +670,9 @@ void thread_get_name(char *buffer, int size, { /* Display thread name if one or ID if none */ bool named = thread->name && *thread->name; - const char *fmt = named ? "%s" : "%08lX"; + const char *fmt = named ? "%s" : "%04lX"; intptr_t name = named ? - (intptr_t)thread->name : (intptr_t)thread; + (intptr_t)thread->name : (intptr_t)thread->id; snprintf(buffer, size, fmt, name); } } diff --git a/firmware/thread.c b/firmware/thread.c index 24bbb317f9..b71bc1749c 100644 --- a/firmware/thread.c +++ b/firmware/thread.c @@ -2379,8 +2379,8 @@ void thread_get_name(char *buffer, int size, const char *fmt = "%s"; if (name == NULL IF_COP(|| name == THREAD_DESTRUCT) || *name == '\0') { - name = (const char *)thread; - fmt = "%08lX"; + name = (const char *)(unsigned int)thread->id; + fmt = "%04lX"; } snprintf(buffer, size, fmt, name); } |