projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
780b962
)
Gisle Vanem caught me breaking the windows version of Curl_strerror()
author
Daniel Stenberg
<daniel@haxx.se>
Tue, 6 Apr 2004 12:02:36 +0000
(12:02 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Tue, 6 Apr 2004 12:02:36 +0000
(12:02 +0000)
lib/strerror.c
patch
|
blob
|
history
diff --git
a/lib/strerror.c
b/lib/strerror.c
index
03ddc1a
..
5e734fa
100644
(file)
--- a/
lib/strerror.c
+++ b/
lib/strerror.c
@@
-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))