X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcerr.c;h=116312b11cb671cca78144eaa24754b8f4a59aeb;hb=9a48fd93fe01972f0de42c6349e2e8a8160ec5df;hp=ae35d57847218327b099556fe823b3bf44ff1ec3;hpb=02d7b9b5209b2cb08151f7d1c160e2d18bc7c0d0;p=YACASL2.git diff --git a/src/cerr.c b/src/cerr.c index ae35d57..116312b 100644 --- a/src/cerr.c +++ b/src/cerr.c @@ -71,7 +71,7 @@ void setcerr(int num, const char *str) cerr->num = num; /* 現在のエラーメッセージを設定 */ cerr->msg = malloc_chk(CERRMSGSIZE + 1, "cerr.msg"); - if(str != NULL && strlen(str) <= CERRSTRSIZE) { + if(0 < strlen(str) && strlen(str) <= CERRSTRSIZE) { sprintf(cerr->msg, "%s: %s", str, getcerrmsg(cerr->num)); } else { strcpy(cerr->msg, getcerrmsg(cerr->num));