mirror of
https://github.com/swaywm/sway.git
synced 2024-11-25 09:21:28 +00:00
numlen(0) == 1
This commit is contained in:
parent
2707be7199
commit
c8cf3f70f9
|
@ -8,7 +8,7 @@ int wrap(int i, int max) {
|
|||
|
||||
int numlen(int n) {
|
||||
if (n == 0) {
|
||||
return n;
|
||||
return 1;
|
||||
}
|
||||
return log10(n) + 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue