mirror of
https://github.com/fumiama/CMoe-Counter.git
synced 2024-11-24 06:10:11 +01:00
优化显示长度
This commit is contained in:
parent
5b98315589
commit
3aa3ecad26
2
cmoe.c
2
cmoe.c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user