From a9382448139ac9339ba4b8c8ed6675487572be07 Mon Sep 17 00:00:00 2001 From: j8takagi Date: Tue, 4 Aug 2026 15:53:03 +0900 Subject: [PATCH] =?utf8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E5=87=BA=E5=8A=9B?= =?utf8?q?=E6=99=82=E3=81=AE=E3=83=92=E3=83=BC=E3=83=97=E3=83=90=E3=83=83?= =?utf8?q?=E3=83=95=E3=82=A1=E3=82=AA=E3=83=BC=E3=83=90=E3=83=BC=E3=83=95?= =?utf8?q?=E3=83=AD=E3=83=BC=E3=81=AE=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?utf8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit https://claude.ai/share/a6dfc5f4-f845-4a2e-8a7c-eb929e393d7d --- include/cerr.h | 2 +- src/cerr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cerr.h b/include/cerr.h index c361c6b..e778cee 100644 --- a/include/cerr.h +++ b/include/cerr.h @@ -36,7 +36,7 @@ extern CERRLIST *cerrlist; enum { CERRSTRSIZE = 10, /**<エラーメッセージ中に挿入できる文字列のサイズ */ - CERRMSGSIZE = 70, /**<エラーメッセージのサイズ */ + CERRMSGSIZE = 140, /**<エラーメッセージのサイズ */ }; /** diff --git a/src/cerr.c b/src/cerr.c index 9e9d219..2aed616 100644 --- a/src/cerr.c +++ b/src/cerr.c @@ -52,7 +52,7 @@ void setcerr(int num, const char *str) } /* 現在のエラーメッセージを設定 */ cerr->msg = malloc_chk(CERRMSGSIZE + 1, "cerr.msg"); - if(0 < strlen(str) && strlen(str) <= CERRSTRSIZE) { + if(0 < strlen(str) && strlen(str) + 2 + strlen(getcerrmsg(num)) <= CERRMSGSIZE) { sprintf(cerr->msg, "%s: %s", str, getcerrmsg(cerr->num)); } else { strcpy(cerr->msg, getcerrmsg(cerr->num)); -- 2.47.3