0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.0.2138: Overflow logic requires long long

Problem:  Overflow logic requires long long
Solution: Define vimlong_T data type to make life easier
          for porters

closes: #13598

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ernie Rael
2023-11-30 18:20:00 +01:00
committed by Christian Brabandt
parent 72314bb85f
commit fda700cb04
6 changed files with 17 additions and 9 deletions

View File

@@ -1730,7 +1730,7 @@ parse_cino(buf_T *buf)
char_u *p;
char_u *l;
char_u *digits;
long long n;
vimlong_T n;
int divider;
int fraction = 0;
int sw;
@@ -1902,7 +1902,7 @@ parse_cino(buf_T *buf)
{
n *= sw;
if (divider)
n += ((long long)sw * fraction + divider / 2) / divider;
n += ((vimlong_T)sw * fraction + divider / 2) / divider;
}
++p;
}