Fixed %p formatting when there is following text

(cherry picked from commit f4bd17deee)
This commit is contained in:
Sam Lantinga committed 2023-07-06 08:37:27 -07:00
1 parent 52d63ba26c
commit 3054c0dc50
2 files changed
+7 -3

No files matched your search

+1 -3
View File
@@ -1810,6 +1810,7 @@ int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *f
case 'p':
info.force_case = SDL_CASE_LOWER;
length += SDL_PrintPointer(TEXT_AND_LEN_ARGS, &info, va_arg(ap, void *));
done = SDL_TRUE;
break;
case 'x':
info.force_case = SDL_CASE_LOWER;
@@ -1821,9 +1822,6 @@ int SDL_vsnprintf(SDL_OUT_Z_CAP(maxlen) char *text, size_t maxlen, const char *f
if (info.radix == 10) {
info.radix = 16;
}
if (*fmt == 'p') {
inttype = DO_LONG;
}
SDL_FALLTHROUGH;
case 'o':
if (info.radix == 10) {