diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-08-19 13:11:47 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-08-19 13:11:47 +0000 |
commit | 48a7201a4a9833e4587d0cb0e04042c845f7f146 (patch) | |
tree | edc2be476f210eae05781ceeeb88a8c70b0b1e2d /otherlibs/unix | |
parent | 3eccaad8ecb28294bddd562b1247a7509e456a19 (diff) |
Bug dans unix_error (cst_to_constr renvoie un entier code!)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@2079 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/unix')
-rw-r--r-- | otherlibs/unix/unixsupport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/unix/unixsupport.c b/otherlibs/unix/unixsupport.c index b576ebe9a..157ac2635 100644 --- a/otherlibs/unix/unixsupport.c +++ b/otherlibs/unix/unixsupport.c @@ -253,11 +253,11 @@ void unix_error(int errcode, char *cmdname, value cmdarg) name = copy_string(cmdname); errconstr = cst_to_constr(errcode, error_table, sizeof(error_table)/sizeof(int), -1); - if (errconstr == -1) { + if (errconstr == Val_int(-1)) { err = alloc(1, 0); Field(err, 0) = Val_int(errcode); } else { - err = Val_int(errconstr); + err = errconstr; } if (unix_error_exn == NULL) { unix_error_exn = caml_named_value("Unix.Unix_error"); |