mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
vim_vsnprintf: fix conversion error #6311
This looks mostly like a case where the compiler that ships with Ubuntu 12.04 has gone a little too far: `fmt_spec` is actually a char, as are the literals, so there's really no issue.
This commit is contained in:
parent
9abef7ded9
commit
c6b3975774
@ -1228,7 +1228,7 @@ int vim_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap,
|
|||||||
l += snprintf(format + 1, sizeof(format) - 1, ".%d",
|
l += snprintf(format + 1, sizeof(format) - 1, ".%d",
|
||||||
(int)precision);
|
(int)precision);
|
||||||
}
|
}
|
||||||
format[l] = fmt_spec == 'F' ? 'f' : fmt_spec;
|
format[l] = (char)(fmt_spec == 'F' ? 'f' : fmt_spec);
|
||||||
format[l + 1] = NUL;
|
format[l + 1] = NUL;
|
||||||
assert(l + 1 < (int)sizeof(format));
|
assert(l + 1 < (int)sizeof(format));
|
||||||
str_arg_l = (size_t)snprintf(tmp, sizeof(tmp), format, f);
|
str_arg_l = (size_t)snprintf(tmp, sizeof(tmp), format, f);
|
||||||
|
Loading…
Reference in New Issue
Block a user