Module: wine Branch: master Commit: 3746381e7e8cf2671567712f6d3f17a9823e8c5b URL: https://source.winehq.org/git/wine.git/?a=commit;h=3746381e7e8cf2671567712f6...
Author: Daniel Lehman dlehman@esri.com Date: Mon Feb 1 17:42:16 2021 -0800
include: Fix [v]sprintf_s declarations.
Signed-off-by: Daniel Lehman dlehman@esri.com Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/msvcrt/stdio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 7dd177e9052..f78e3b36f2b 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -218,19 +218,19 @@ static inline int __cdecl vsprintf(char *buffer, const char *format, __ms_va_lis return ret < 0 ? -1 : ret; }
-static inline int __cdecl vsprintf_s(char *buffer, const char *format, __ms_va_list args) +static inline int __cdecl vsprintf_s(char *buffer, size_t size, const char *format, __ms_va_list args) { - int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, -1, format, NULL, args); + int ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args); return ret < 0 ? -1 : ret; }
-static inline int WINAPIV sprintf_s(char *buffer, size_t size, size_t count, const char *format, ...) +static inline int WINAPIV sprintf_s(char *buffer, size_t size, const char *format, ...) { int ret; __ms_va_list args;
__ms_va_start(args, format); - ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, -1, format, NULL, args); + ret = __stdio_common_vsprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, buffer, size, format, NULL, args); __ms_va_end(args); return ret; }