]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.2114: overflow detection not accurate when adding digits v9.0.2114
authorChristian Brabandt <cb@256bit.org>
Sun, 19 Nov 2023 09:47:21 +0000 (10:47 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 19 Nov 2023 09:47:21 +0000 (10:47 +0100)
commit22cbc8a4e17ce61aa460c451a26e1bff2c3d2af9
treec2fe07c70767247997525c00d2b6fe2ab4df9bd7
parent22a97fc241361aa91bda84e5344d5b7c0cda3e81
patch 9.0.2114: overflow detection not accurate when adding digits

Problem:  overflow detection not accurate when adding digits
Solution: Use a helper function

Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.

closes: #13539

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
src/misc1.c
src/normal.c
src/proto/misc1.pro
src/version.c