diff --git a/strftime.c b/strftime.c index d16a101..1d3cfd4 100644 --- a/strftime.c +++ b/strftime.c @@ -620,6 +620,10 @@ const char * const ptlim; #define DIVISOR 100 lead = a / DIVISOR + b / DIVISOR; trail = a % DIVISOR + b % DIVISOR; + if (trail > DIVISOR) { + trail -= DIVISOR; + ++lead; + } while (trail < 0) { trail += DIVISOR; --lead;