From: q66 Date: Thu, 11 Aug 2011 08:52:00 +0000 (+0200) Subject: Prevent threadid_t from losing precision when casted on 64bit systems X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=43b6ca0d14f784657cbbe106aa0f51e2300d30e0;p=zefram%2Fminetest%2Fminetest_engine.git Prevent threadid_t from losing precision when casted on 64bit systems --- diff --git a/src/debug.cpp b/src/debug.cpp index a1918623..befd73a3 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -68,9 +68,9 @@ Nullstream dummyout; void assert_fail(const char *assertion, const char *file, unsigned int line, const char *function) { - DEBUGPRINT("\nIn thread %x:\n" + DEBUGPRINT("\nIn thread %lx:\n" "%s:%d: %s: Assertion '%s' failed.\n", - (unsigned int)get_current_thread_id(), + (unsigned long)get_current_thread_id(), file, line, function, assertion); debug_stacks_print(); @@ -95,8 +95,8 @@ DebugStack::DebugStack(threadid_t id) void DebugStack::print(FILE *file, bool everything) { - fprintf(file, "DEBUG STACK FOR THREAD %x:\n", - (unsigned int)threadid); + fprintf(file, "DEBUG STACK FOR THREAD %lx:\n", + (unsigned long)threadid); for(int i=0; i