From f8ada3eaa92d1acff3180a3ef452cbdfbb0933fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:15:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=98=BE=E7=A4=BA=E9=95=BF?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmoe.c b/cmoe.c index 73c17f6..dcf152b 100644 --- a/cmoe.c +++ b/cmoe.c @@ -117,9 +117,9 @@ static void return_count(char* name, char* theme) { char cntstrbuf[11]; sprintf(cntstrbuf, "%010u", d->count); free(spb); - char* cntstr; + char* cntstr = cntstrbuf; for(int i = 0; i < 10; i++) if(cntstrbuf[i] != '0') { - cntstr = cntstrbuf+(i>2)?(i-2):0; + if(i > 2) cntstr = cntstrbuf+i-2; break; } int isbig = 0;