summaryrefslogtreecommitdiffstats
path: root/otherlibs/win32unix/errmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'otherlibs/win32unix/errmsg.c')
-rw-r--r--otherlibs/win32unix/errmsg.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/otherlibs/win32unix/errmsg.c b/otherlibs/win32unix/errmsg.c
index 20a8c8d58..9ce9dddb2 100644
--- a/otherlibs/win32unix/errmsg.c
+++ b/otherlibs/win32unix/errmsg.c
@@ -26,7 +26,7 @@ CAMLprim value unix_error_message(value err)
{
int errnum;
char buffer[512];
-
+
errnum = Is_block(err) ? Int_val(Field(err, 0)) : error_table[Int_val(err)];
if (errnum > 0)
return copy_string(strerror(errnum));
@@ -38,7 +38,6 @@ CAMLprim value unix_error_message(value err)
sizeof(buffer),
NULL))
return copy_string(buffer);
- sprintf(buffer, "unknown error #%d", errnum);
+ sprintf(buffer, "unknown error #%d", errnum);
return copy_string(buffer);
}
-