comparison src/cmdexpand.c @ 19560:df0a6cba5c3d v8.2.0337

patch 8.2.0337: build fails on a few systems Commit: https://github.com/vim/vim/commit/b54b8e0c86b0590394803157818c72412a6f0b6a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 1 01:05:53 2020 +0100 patch 8.2.0337: build fails on a few systems Problem: Build fails on a few systems. Solution: Use vim_snprintf() instead of snprintf().
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Mar 2020 01:15:54 +0100
parents ff5048b0ccfe
children 435726a03481
comparison
equal deleted inserted replaced
19559:0957ce5072d4 19560:df0a6cba5c3d
2122 if (xp->xp_context == EXPAND_USER_FUNC && STRNCMP(pat, "^s:", 3) == 0) 2122 if (xp->xp_context == EXPAND_USER_FUNC && STRNCMP(pat, "^s:", 3) == 0)
2123 { 2123 {
2124 int len = (int)STRLEN(pat) + 20; 2124 int len = (int)STRLEN(pat) + 20;
2125 2125
2126 tofree = alloc(len); 2126 tofree = alloc(len);
2127 snprintf((char *)tofree, len, "^<SNR>\\d\\+_%s", pat + 3); 2127 vim_snprintf((char *)tofree, len, "^<SNR>\\d\\+_%s", pat + 3);
2128 pat = tofree; 2128 pat = tofree;
2129 } 2129 }
2130 2130
2131 regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0); 2131 regmatch.regprog = vim_regcomp(pat, p_magic ? RE_MAGIC : 0);
2132 if (regmatch.regprog == NULL) 2132 if (regmatch.regprog == NULL)