Skip to content
Snippets Groups Projects
Commit ca7f0852 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Gisle Vanem caught me breaking the windows version of Curl_strerror()

parent 780b9623
No related branches found
No related tags found
No related merge requests found
......@@ -510,7 +510,9 @@ const char *Curl_strerror(struct connectdata *conn, int err)
#if defined(WIN32) && !defined(__CYGWIN__)
/* 'sys_nerr' is the maximum errno number, it is not widely portable */
if (err >= 0 && err < sys_nerr) {
if (err >= 0 && err < sys_nerr)
strncpy(buf, strerror(err), max);
else {
if (!get_winsock_error (err, buf, max) &&
!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM, NULL, err,
LANG_NEUTRAL, buf, max, NULL))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment