mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +00:00
Avoid using _vsnprintf on MinGW.
We went to the trouble of getting standard C99 format strings with __USE_MINGW_ANSI_STDIO, but then used _vsnprintf, which bypasses them and implements the non-standard Microsoft format strings, leading to incorrect behaviour. Ubuntu 14.04's mingw-w64 at least defines a vsnprintf() in all circumstances, so we should use it.
This commit is contained in:
parent
65b3c93a8e
commit
134dc0bcaf
5
utils.c
5
utils.c
@ -308,7 +308,10 @@ int string_length_for_printf(size_t s)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Also lack of vsnprintf before VS2015 */
|
/* Also lack of vsnprintf before VS2015 */
|
||||||
#if defined _WINDOWS && !defined __WINE__ && _MSC_VER < 1900
|
#if defined _WINDOWS && \
|
||||||
|
!defined __MINGW32__ && \
|
||||||
|
!defined __WINE__ && \
|
||||||
|
_MSC_VER < 1900
|
||||||
#define vsnprintf _vsnprintf
|
#define vsnprintf _vsnprintf
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user