XQuartz: Make a copy of args for our crash reporter vsnprintf

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston 2011-05-05 09:04:41 -07:00
parent 3ac220d6cc
commit b47d2e43eb
1 changed files with 6 additions and 1 deletions

View File

@ -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);