aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 63e7a80e53..44a9c07ec8 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -3619,6 +3619,7 @@ static linenr_T get_address(exarg_T *eap, char **ptr, cmd_addr_T addr_type, bool
n = getdigits_int32(&cmd, false, MAXLNUM);
if (n == MAXLNUM) {
*errormsg = _(e_line_number_out_of_range);
+ cmd = NULL;
goto error;
}
}
@@ -3641,6 +3642,7 @@ static linenr_T get_address(exarg_T *eap, char **ptr, cmd_addr_T addr_type, bool
} else {
if (lnum >= 0 && n >= INT32_MAX - lnum) {
*errormsg = _(e_line_number_out_of_range);
+ cmd = NULL;
goto error;
}
lnum += n;