mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
parent
943cd51b67
commit
ec56dfa35e
1 changed files with 3 additions and 3 deletions
|
@ -1487,10 +1487,10 @@ inline T Response::get_header_value(const char *key, size_t id) const {
|
|||
template <typename... Args>
|
||||
inline ssize_t Stream::write_format(const char *fmt, const Args &...args) {
|
||||
const auto bufsiz = 2048;
|
||||
std::array<char, bufsiz> buf;
|
||||
std::array<char, bufsiz> buf{};
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1900
|
||||
auto sn = _snprintf_s(buf.data(), bufsiz - 1, buf.size() - 1, fmt, args...);
|
||||
auto sn = _snprintf_s(buf.data(), bufsiz, _TRUNCATE, fmt, args...);
|
||||
#else
|
||||
auto sn = snprintf(buf.data(), buf.size() - 1, fmt, args...);
|
||||
#endif
|
||||
|
@ -5673,7 +5673,7 @@ inline void ClientImpl::close_socket(Socket &socket) {
|
|||
|
||||
inline bool ClientImpl::read_response_line(Stream &strm, const Request &req,
|
||||
Response &res) {
|
||||
std::array<char, 2048> buf;
|
||||
std::array<char, 2048> buf{};
|
||||
|
||||
detail::stream_line_reader line_reader(strm, buf.data(), buf.size());
|
||||
|
||||
|
|
Loading…
Reference in a new issue