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:
Hirohito Higashi
2026-03-23 18:46:31 +00:00
committed by Christian Brabandt
parent 3d472d8675
commit 347e8c1e7d
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -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);
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
233,
/**/
232,
/**/