vim-patch:8.2.3660: overflow check uses wrong number

Problem:    Overflow check uses wrong number.
Solution:   Divide by ten.
9b0e82f35e
This commit is contained in:
zeertzjq 2022-02-18 08:48:29 +08:00
parent 3ed800e998
commit 330b3da51e

View File

@ -824,7 +824,7 @@ static bool normal_get_command_count(NormalState *s)
if (s->c == K_DEL || s->c == K_KDEL) {
s->ca.count0 /= 10;
del_from_showcmd(4); // delete the digit and ~@%
} else if (s->ca.count0 >= 999999999L) {
} else if (s->ca.count0 > 99999999L) {
s->ca.count0 = 999999999L;
} else {
s->ca.count0 = s->ca.count0 * 10 + (s->c - '0');