numlen(0) == 1

This commit is contained in:
Mikkel Oscar Lyderik 2016-01-24 03:02:51 +01:00
parent 2707be7199
commit c8cf3f70f9

View file

@ -8,7 +8,7 @@ int wrap(int i, int max) {
int numlen(int n) { int numlen(int n) {
if (n == 0) { if (n == 0) {
return n; return 1;
} }
return log10(n) + 1; return log10(n) + 1;
} }