From a77b6411660fc8937728193cb93b1474a8262354 Mon Sep 17 00:00:00 2001 From: Yorick Hardy Date: Sun, 16 Feb 2025 14:22:10 +0200 Subject: [PATCH] runtime: use the correct string length for comparison Fix for the pull request adressing issue #556. --- runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime.c b/runtime.c index 74a0f719..ad72164d 100644 --- a/runtime.c +++ b/runtime.c @@ -711,7 +711,7 @@ object Cyc_default_exception_handler(void *data, object _, int argc, if ((err == NULL) || is_value_type(err) || type_of(err) != pair_tag || !Cyc_is_symbol(car(err))) { Cyc_display(data, err, stderr); } else { - if (strncmp(((symbol) car(err))->desc, "error", 10) == 0) { + if (strncmp(((symbol) car(err))->desc, "error", 5) == 0) { // Error is list of form (type arg1 ... argn) err = cdr(err); // skip type field for (; (err != NULL); err = cdr(err)) { // output with no enclosing parens