Skip to content

Commit

Permalink
Merge pull request #37 from kosmonaffft/main
Browse files Browse the repository at this point in the history
Fix building under windows with gcc.
  • Loading branch information
dmitigr committed Feb 1, 2023
2 parents 868e363 + b23ec3e commit f267e92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ inline std::string error_message(const int code)
{
#ifdef _WIN32
char buf[128];
if (const int e = ::strerror_s(buf, code))
if (const int e = ::strerror_s(buf, sizeof(buf), code))
throw Sys_exception{e, "cannot get an OS error message"};
else
return buf;
Expand Down

0 comments on commit f267e92

Please sign in to comment.