XQuartz: Make a copy of args for our crash reporter vsnprintf
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit b47d2e43eb
)
This commit is contained in:
parent
f893dfaa3e
commit
35d14476e4
7
os/log.c
7
os/log.c
|
@ -528,7 +528,12 @@ FatalError(const char *f, ...)
|
|||
|
||||
va_start(args, f);
|
||||
#ifdef __APPLE__
|
||||
(void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args);
|
||||
{
|
||||
va_list args2;
|
||||
va_copy(args2, args);
|
||||
(void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, args2);
|
||||
va_end(args2);
|
||||
}
|
||||
#endif
|
||||
VErrorF(f, args);
|
||||
va_end(args);
|
||||
|
|
Loading…
Reference in New Issue