summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-14 20:41:05 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-14 20:41:05 +0200
commit9c0044df7c58f0afc74ed9afd034b55850758da1 (patch)
tree77f0abf481bdef1d272961642dcde19194010192 /src/ex_docmd.c
parent2efbc66e260a9988b5d66c68de940bff6fcdb954 (diff)
updated for version 7.2.430v7.2.430
Problem: The ++bad argument is handled wrong, resulting in an invalid memory access. Solution: Use the bad_char field only for the replacement character, add bad_char_idx to store the position. (Dominique Pelle)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index dbb058444e..748e3bc69d 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4739,7 +4739,7 @@ getargopt(eap)
else if (STRNCMP(arg, "bad", 3) == 0)
{
arg += 3;
- pp = &eap->bad_char;
+ pp = &eap->bad_char_idx;
}
#endif
@@ -4770,7 +4770,7 @@ getargopt(eap)
{
/* Check ++bad= argument. Must be a single-byte character, "keep" or
* "drop". */
- p = eap->cmd + eap->bad_char;
+ p = eap->cmd + eap->bad_char_idx;
if (STRICMP(p, "keep") == 0)
eap->bad_char = BAD_KEEP;
else if (STRICMP(p, "drop") == 0)