One game spams this function so much that it becomes the single biggest contributor to the Wine log size.
From: Aida Jonikienė aidas957@gmail.com
One game spams this function so much that it becomes the single biggest contributor to the Wine log size. --- dlls/msvcrt/scanf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index 89575101471..d71a9c5c1d4 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -710,7 +710,9 @@ int CDECL __stdio_common_vfscanf(unsigned __int64 options, _locale_t locale, va_list valist) { - if (options & ~_CRT_INTERNAL_SCANF_SECURECRT) + static unsigned int once; + + if ((options & ~_CRT_INTERNAL_SCANF_SECURECRT) && !once++) FIXME("options %#I64x not handled\n", options); if (options & _CRT_INTERNAL_SCANF_SECURECRT) return vfscanf_s_l(file, format, locale, valist);
Piotr Caban (@piotr) commented about dlls/msvcrt/scanf.c:
_locale_t locale, va_list valist)
{
- if (options & ~_CRT_INTERNAL_SCANF_SECURECRT)
- static unsigned int once;
- if ((options & ~_CRT_INTERNAL_SCANF_SECURECRT) && !once++) FIXME("options %#I64x not handled\n", options);
What's the value of flag that we don't support? Do you know how hard it is to implement missing flag instead of disabling FIXME message?
On Thu Mar 7 11:13:04 2024 +0000, Piotr Caban wrote:
What's the value of flag that we don't support? Do you know how hard it is to implement missing flag instead of disabling FIXME message?
It's 0x2 (`_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS`)
Looking at the Wine source code this flag is used by the scanf(_s) and fscanf(_s) functions (after some searches I discovered it's used to enable the pre-C99 format specifier behavior)
On Thu Mar 7 11:26:34 2024 +0000, Aida Jonikienė wrote:
It's 0x2 (`_CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS`) Looking at the Wine source code this flag is used by the scanf(_s) and fscanf(_s) functions (after some searches I discovered it's used to enable the pre-C99 format specifier behavior)
The flag has only effect on wide scanf and can be ignored in __stdio_common_vfscanf.
Please change the code to: ```c if (options & ~(_CRT_INTERNAL_SCANF_SECURECRT | _CRT_INTERNAL_SCANF_LEGACY_WIDE_SPECIFIERS)) FIXME("options %#I64x not handled\n", options); ```