mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.2.0233: Compiler warning in strings.c
Problem: Compiler warning in strings.c
(Timothy Rice, after v9.2.0031)
Solution: Return early when str_m is zero
(Hirohito Higashi)
fixes: #19795
closes: #19800
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
3d472d8675
commit
347e8c1e7d
@@ -2849,6 +2849,9 @@ vim_snprintf_safelen(char *str, size_t str_m, const char *fmt, ...)
|
||||
va_list ap;
|
||||
int str_l;
|
||||
|
||||
if (str_m == 0)
|
||||
return 0;
|
||||
|
||||
va_start(ap, fmt);
|
||||
str_l = vim_vsnprintf_typval(str, str_m, fmt, ap, NULL);
|
||||
va_end(ap);
|
||||
|
||||
@@ -734,6 +734,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
233,
|
||||
/**/
|
||||
232,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user