1
0
mirror of https://github.com/fumiama/CMoe-Counter.git synced 2024-11-23 22:00:56 +01:00

优化显示长度

This commit is contained in:
源文雨 2022-03-02 18:05:17 +08:00
parent 5b98315589
commit 3aa3ecad26

2
cmoe.c
View File

@ -118,7 +118,7 @@ static void return_count(char* name, char* theme) {
sprintf(cntstrbuf, "%010u", d->count);
free(spb);
char* cntstr;
for(cntstr = (char*)cntstrbuf+9; cntstr > (char*)cntstrbuf; cntstr--) if(*cntstr == '0') break;
for(cntstr = (char*)cntstrbuf; cntstr < (char*)cntstrbuf+10; cntstr++) if(*cntstr != '0') break;
if(cntstr - (char*)cntstrbuf > 2) cntstr -= 2; // 保留 3 位 0
else cntstr = cntstrbuf; // 保留所有 0
int isbig = 0;