diff --git a/core/libs/prx/libc/include/WindowsScanning.hpp b/core/libs/prx/libc/include/WindowsScanning.hpp index fbcded502..ff7701281 100644 --- a/core/libs/prx/libc/include/WindowsScanning.hpp +++ b/core/libs/prx/libc/include/WindowsScanning.hpp @@ -2,6 +2,7 @@ #define CORE_LIBS_PRX_LIBC_INCLUDE_WINDOWSSCANNING_HPP #include "WindowsFormatting.hpp" +#include "General.hpp" #include namespace LibcDetail { @@ -25,7 +26,11 @@ inline int ScanWindows(const char* input, const char* format, const void* source if ((length == "h" && *format == 'h') || (length == "l" && *format == 'l')) length += *format++; } const char conversion = *format; - if (!conversion || !std::strchr("diouxXaAeEfFgGcspn[", conversion)) { errno = 22; return EOF; } + if (!conversion) { errno = 22; return EOF; } + if (!std::strchr("diouxXaAeEfFgGcspn[", conversion)) { + NotImplemented_nid_no_patch("vsscanf format conversion"); + return EOF; + } ++format; if (std::strchr("diouxXn", conversion) && (length == "l" || length == "j" || length == "z" || length == "t")) translated += "ll"; diff --git a/core/libs/prx/libc/include/WindowsWideFormatting.hpp b/core/libs/prx/libc/include/WindowsWideFormatting.hpp index ce7fba99a..8d4baba34 100644 --- a/core/libs/prx/libc/include/WindowsWideFormatting.hpp +++ b/core/libs/prx/libc/include/WindowsWideFormatting.hpp @@ -2,6 +2,7 @@ #define CORE_LIBS_PRX_LIBC_INCLUDE_WINDOWSWIDEFORMATTING_HPP #include "WindowsFormatting.hpp" +#include "General.hpp" #include #include #include @@ -45,7 +46,11 @@ inline int FormatWideWindows(wchar_t* output, size_t capacity, const wchar_t* fo if ((length == L"h" && *format == L'h') || (length == L"l" && *format == L'l')) length += *format++; } const wchar_t conversion = *format; - if (!conversion || !std::wcschr(L"diouxXaAeEfFgGcspn", conversion)) { errno = 22; return -1; } + if (!conversion) { errno = 22; return -1; } + if (!std::wcschr(L"diouxXaAeEfFgGcspn", conversion)) { + NotImplemented_nid_no_patch("swprintf format conversion"); + return -1; + } ++format; if (std::wcschr(L"diouxXn", conversion) && (length == L"l" || length == L"j" || length == L"z" || length == L"t")) translated += L"ll";