X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=src%2Fcerr.c;h=116312b11cb671cca78144eaa24754b8f4a59aeb;hp=ae35d57847218327b099556fe823b3bf44ff1ec3;hb=f8636262f5c60efbb9d1c608e2276d359bc348a0;hpb=176a22fd90e39acf9b4bdae260d71b8d31be6db0 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));