mirror of
https://github.com/boostorg/regex.git
synced 2025-07-15 13:26:38 +02:00
Merge branch 'patch-3' of https://github.com/ya1gaurav/regex into develop
This commit is contained in:
@ -182,10 +182,12 @@ BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
|
||||||
(::sprintf_s)(localbuf, 5, "%d", 0);
|
int r = (::sprintf_s)(localbuf, 5, "%d", 0);
|
||||||
#else
|
#else
|
||||||
(std::sprintf)(localbuf, "%d", 0);
|
int r = (std::sprintf)(localbuf, "%d", 0);
|
||||||
#endif
|
#endif
|
||||||
|
if(r < 0)
|
||||||
|
return 0; // sprintf failed
|
||||||
if(std::strlen(localbuf) < buf_size)
|
if(std::strlen(localbuf) < buf_size)
|
||||||
BOOST_REGEX_DETAIL_NS::strcpy_s(buf, buf_size, localbuf);
|
BOOST_REGEX_DETAIL_NS::strcpy_s(buf, buf_size, localbuf);
|
||||||
return std::strlen(localbuf) + 1;
|
return std::strlen(localbuf) + 1;
|
||||||
|
Reference in New Issue
Block a user