summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2023-06-11 19:23:50 -0300
committerAndrés <andmarti@gmail.com>2023-06-11 19:23:50 -0300
commit4c5efde4599758f88a6ddd62240e4c54a8997f0d (patch)
treea0cef5b2ef9df173c2ca400563cb545a73c0ab5b
parent62739e477e4fd28258324c5d40a1455644a0924b (diff)
get rid of build warnings
-rw-r--r--src/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file.c b/src/file.c
index 7f4a881..570c2fe 100644
--- a/src/file.c
+++ b/src/file.c
@@ -515,7 +515,7 @@ void write_fd(FILE * f, struct roman * doc) {
sprintf(strcolor, " fg=%.*s", BUFFERSIZE-5, &line[0]);
free(e);
} else if ((cc = get_custom_color_by_number((*pp)->ucolor->fg - 7)) != NULL) {
- sprintf(strcolor, " fg=%.*s", BUFFERSIZE, cc->name);
+ sprintf(strcolor, " fg=%.*s", BUFFERSIZE-5, cc->name);
}
}
@@ -526,10 +526,10 @@ void write_fd(FILE * f, struct roman * doc) {
decompile(e, 0);
uppercase(line);
del_char(line, 0);
- sprintf(strcolor + strlen(strcolor), " bg=%s", &line[0]);
+ sprintf(strcolor + strlen(strcolor), " bg=%.*s", BUFFERSIZE-5, &line[0]);
free(e);
} else if ((cc = get_custom_color_by_number((*pp)->ucolor->bg - 7)) != NULL) {
- sprintf(strcolor + strlen(strcolor), " bg=%.*s", BUFFERSIZE, cc->name);
+ sprintf(strcolor + strlen(strcolor), " bg=%.*s", BUFFERSIZE-5, cc->name);
}
}