forked from aniani/vim
patch 7.4.1819
Problem: Compiler warnings when sprintf() is a macro.
Solution: Don't interrupt sprintf() with an #ifdef. (Michael Jarvis,
closes #788)
This commit is contained in:
@@ -2630,12 +2630,12 @@ term_color(char_u *s, int n)
|
||||
|| STRCMP(s + i + 1, "%dm") == 0)
|
||||
&& (s[i] == '3' || s[i] == '4'))
|
||||
{
|
||||
sprintf(buf,
|
||||
#ifdef TERMINFO
|
||||
"%s%s%%p1%%dm",
|
||||
char *format = "%s%s%%p1%%dm";
|
||||
#else
|
||||
"%s%s%%dm",
|
||||
char *format = "%s%s%%dm";
|
||||
#endif
|
||||
sprintf(buf, format,
|
||||
i == 2 ? IF_EB("\033[", ESC_STR "[") : "\233",
|
||||
s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
|
||||
: (n >= 16 ? "48;5;" : "10"));
|
||||
|
||||
Reference in New Issue
Block a user