Tint2conf: use strcat instead of append (issue #580)

This commit is contained in:
o9000
2016-05-18 23:27:55 +02:00
parent d49dac2e05
commit ed3fcd63fc
3 changed files with 6 additions and 19 deletions

View File

@@ -158,15 +158,16 @@ void config_write_backgrounds(FILE *fp)
fprintf(fp, "rounded = %d\n", r);
fprintf(fp, "border_width = %d\n", b);
char *sides = "\0";
char sides[10];
sides[0] = '\0';
if (sideTop)
sides = append(sides, 'T');
strcat(sides, "T");
if (sideBottom)
sides = append(sides, 'B');
strcat(sides, "B");
if (sideLeft)
sides = append(sides, 'L');
strcat(sides, "L");
if (sideRight)
sides = append(sides, 'R');
strcat(sides, "R");
fprintf(fp, "border_sides = %s\n", sides);
config_write_color(fp, "background_color", *fillColor, fillOpacity);