Fix DirectInput error codes being lost

Jimb Esser 2019-03-16 18:11:09 -07:00
parent c528615626
commit 58ca76bee3
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...)
case 0: /* Malformed format string.. */ case 0: /* Malformed format string.. */
--fmt; --fmt;
break; break;
case 'i': case 'd': case 'u': case 'i': case 'd': case 'u': case 'x': case 'X':
error->args[error->argc++].value_l = va_arg(ap, long); error->args[error->argc++].value_l = va_arg(ap, long);
break; break;
} }
@ -234,7 +234,7 @@ SDL_GetErrorMsg(char *errstr, int maxlen)
*spot++ = *fmt++; *spot++ = *fmt++;
*spot++ = '\0'; *spot++ = '\0';
switch (spot[-2]) { switch (spot[-2]) {
case 'i': case 'd': case 'u': case 'i': case 'd': case 'u': case 'x': case 'X':
len = SDL_snprintf(msg, maxlen, tmp, len = SDL_snprintf(msg, maxlen, tmp,
error->args[argi++].value_l); error->args[argi++].value_l);
if (len > 0) { if (len > 0) {