vim-patch:8.2.3573: cannot decide whether to skip test that fails with 64 bit

Problem:    Cannot decide whether to skip test that fails with 64 bit ints.
            (closes vim/vim#9072)
Solution:   Add v:sizeofint, v:sizeoflong and v:sizeofpointer.  Improve the
            check for multiply overflow.
69b3072d98

Omit v:sizeof{int,long,pointer} as they're only really used for tests.
This commit is contained in:
Sean Dewar
2022-02-16 21:23:08 +00:00
parent a256b710a2
commit b149665689
3 changed files with 5 additions and 8 deletions

View File

@@ -3434,7 +3434,8 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
const long multlen = count * yanklen;
totlen = (size_t)(int)multlen;
if (totlen != (size_t)multlen) {
if (totlen != (size_t)multlen || (long)totlen / count != yanklen
|| (long)totlen / yanklen != count) {
emsg(_(e_resulting_text_too_long));
break;
} else if (totlen > 0) {