Fix the format string when printing uintptr_t

PiperOrigin-RevId: 789333383
Change-Id: I32b190ffa6579a93970650df58865083aa0a18ab
This commit is contained in:
Matija Kecman
2025-07-31 07:49:42 -07:00
committed by Copybara-Service
parent 23fa7c00d5
commit ee63b82e1c
+7 -8
View File
@@ -14,7 +14,7 @@
#include "engine/engine_io.h" #include "engine/engine_io.h"
#include <inttypes.h> // NOLINT required for PRIu64 #include <inttypes.h> // NOLINT required for PRIu64, PRIuPTR
#include <limits.h> #include <limits.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
@@ -1699,13 +1699,12 @@ static inline void* stackallocinternal(mjData* d, mjStackInfo* stack_info, size_
} else { } else {
info[0] = '\0'; info[0] = '\0';
} }
mju_error("mj_stackAlloc: out of memory, stack overflow%s\n" mju_error(
" max = %zu, available = %zu, requested = %zu\n" "mj_stackAlloc: out of memory, stack overflow%s\n"
" nefc = %d, ncon = %d", " max = %" PRIuPTR ", available = %" PRIuPTR ", requested = %" PRIuPTR
info, "\n nefc = %d, ncon = %d",
stack_info->bottom - stack_info->limit, stack_available_bytes, stack_required_bytes, info, stack_info->bottom - stack_info->limit, stack_available_bytes,
d->nefc, d->ncon); stack_required_bytes, d->nefc, d->ncon);
} }
#ifdef ADDRESS_SANITIZER #ifdef ADDRESS_SANITIZER