summaryrefslogtreecommitdiffstats
path: root/byterun/printexc.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/printexc.c')
-rw-r--r--byterun/printexc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/byterun/printexc.c b/byterun/printexc.c
index b32109cc4..6e70d524c 100644
--- a/byterun/printexc.c
+++ b/byterun/printexc.c
@@ -53,7 +53,7 @@ CAMLexport char * caml_format_exception(value exn)
buf.ptr = buf.data;
buf.end = buf.data + sizeof(buf.data) - 1;
- if (Wosize_val(exn) >= 2) {
+ if (Tag_val(exn) == 0) {
add_string(&buf, String_val(Field(Field(exn, 0), 0)));
/* Check for exceptions in the style of Match_failure and Assert_failure */
if (Wosize_val(exn) == 2 &&