diff options
Diffstat (limited to 'src/nvim/regexp.c')
-rw-r--r-- | src/nvim/regexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 2ff4dbee70..ad3cce9120 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -11517,7 +11517,7 @@ static void nfa_print_state2(FILE *debugf, nfa_state_T *state, garray_T *indent) uint8_t save[2]; strncpy(save, &p[last], 2); // NOLINT(runtime/printf) - memcpy(&p[last], "+-", 2); + memcpy(&p[last], S_LEN("+-")); fprintf(debugf, " %s", p); strncpy(&p[last], save, 2); // NOLINT(runtime/printf) } else { @@ -15932,7 +15932,7 @@ regprog_T *vim_regcomp(const char *expr_arg, int re_flags) regexp_engine = (int)p_re; // Check for prefix "\%#=", that sets the regexp engine - if (strncmp(expr, "\\%#=", 4) == 0) { + if (strncmp(expr, S_LEN("\\%#=")) == 0) { int newengine = expr[4] - '0'; if (newengine == AUTOMATIC_ENGINE |