diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 60896567e97..7cfc3704461 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -646,7 +646,7 @@ # stub _iswupper_l(long ptr) # stub _iswxdigit_l(long ptr) @ cdecl _isxdigit_l(long ptr) MSVCRT__isxdigit_l -@ cdecl _itoa(long ptr long) ntdll._itoa +@ cdecl _itoa(long ptr long) @ cdecl _itoa_s(long ptr long long) @ cdecl _itow(long ptr long) ntdll._itow @ cdecl _itow_s(long ptr long long) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 5678a89eb23..a6b328bda95 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -1138,6 +1138,14 @@ int CDECL _itoa_s(int value, char *str, MSVCRT_size_t size, int radix) return _ltoa_s(value, str, size, radix); } +/********************************************************************* + * _itoa (MSVCRT.@) + */ +char* CDECL _itoa(int value, char *str, int radix) +{ + return _itoa_s(value, str, MSVCRT_SIZE_MAX, radix) ? NULL : str; +} + /********************************************************************* * _itow_s (MSVCRT.@) */