Fix observed crash in IPhone::Log

This commit is contained in:
Scott Ludwig 2016-01-12 15:32:40 -08:00
parent edc455c93d
commit 83a84abc08

View File

@ -337,7 +337,11 @@ void IPhone::Log(char *pszFormat, va_list va)
#endif
char sz[512];
vsnprintf(sz, sizeof(sz), pszFormat, va);
if (va != NULL) {
vsnprintf(sz, sizeof(sz), pszFormat, va);
} else {
strncpyz(sz, pszFormat, sizeof(sz));
}
#ifdef SIMULATOR
printf("%s\n", sz);