mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
Prevent threadid_t from losing precision when casted on 64bit systems
This commit is contained in:
parent
ff35014eff
commit
43b6ca0d14
@ -68,9 +68,9 @@ Nullstream dummyout;
|
|||||||
void assert_fail(const char *assertion, const char *file,
|
void assert_fail(const char *assertion, const char *file,
|
||||||
unsigned int line, const char *function)
|
unsigned int line, const char *function)
|
||||||
{
|
{
|
||||||
DEBUGPRINT("\nIn thread %x:\n"
|
DEBUGPRINT("\nIn thread %lx:\n"
|
||||||
"%s:%d: %s: Assertion '%s' failed.\n",
|
"%s:%d: %s: Assertion '%s' failed.\n",
|
||||||
(unsigned int)get_current_thread_id(),
|
(unsigned long)get_current_thread_id(),
|
||||||
file, line, function, assertion);
|
file, line, function, assertion);
|
||||||
|
|
||||||
debug_stacks_print();
|
debug_stacks_print();
|
||||||
@ -95,8 +95,8 @@ DebugStack::DebugStack(threadid_t id)
|
|||||||
|
|
||||||
void DebugStack::print(FILE *file, bool everything)
|
void DebugStack::print(FILE *file, bool everything)
|
||||||
{
|
{
|
||||||
fprintf(file, "DEBUG STACK FOR THREAD %x:\n",
|
fprintf(file, "DEBUG STACK FOR THREAD %lx:\n",
|
||||||
(unsigned int)threadid);
|
(unsigned long)threadid);
|
||||||
|
|
||||||
for(int i=0; i<stack_max_i; i++)
|
for(int i=0; i<stack_max_i; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user