diff options
author | q66 <quaker66@gmail.com> | 2011-08-11 10:52:00 +0200 |
---|---|---|
committer | q66 <quaker66@gmail.com> | 2011-08-11 10:52:27 +0200 |
commit | 43b6ca0d14f784657cbbe106aa0f51e2300d30e0 (patch) | |
tree | c88d94ee86290e4ef16ceed86e9944c1665b03b7 /src/debug.cpp | |
parent | ff35014eff73aadc3ffa957bd860958c9aeefd33 (diff) | |
download | minetest-43b6ca0d14f784657cbbe106aa0f51e2300d30e0.tar.gz minetest-43b6ca0d14f784657cbbe106aa0f51e2300d30e0.tar.bz2 minetest-43b6ca0d14f784657cbbe106aa0f51e2300d30e0.zip |
Prevent threadid_t from losing precision when casted on 64bit systems
Diffstat (limited to 'src/debug.cpp')
-rw-r--r-- | src/debug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug.cpp b/src/debug.cpp index a19186232..befd73a38 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<stack_max_i; i++) { |