diff options
Diffstat (limited to 'libc/string/strerror.c')
-rw-r--r-- | libc/string/strerror.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/string/strerror.c b/libc/string/strerror.c index 6eeac104e..91565965f 100644 --- a/libc/string/strerror.c +++ b/libc/string/strerror.c @@ -32,14 +32,14 @@ char *strerror(int err) if (sys_nerr) { if (err < 0 || err >= sys_nerr) goto unknown; - return sys_errlist[err]; + strcpy(retbuf, sys_errlist[err]); + return retbuf; } if (err <= 0) goto unknown; unknown: - printf("sys_nerr=%d\n", sys_nerr); strcpy(retbuf, "Unknown Error: errno="); strcat(retbuf, (char *) itoa(err)); return retbuf; |