diff options
author | Andrés <andmarti@gmail.com> | 2023-06-11 19:23:50 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2023-06-11 19:23:50 -0300 |
commit | 4c5efde4599758f88a6ddd62240e4c54a8997f0d (patch) | |
tree | a0cef5b2ef9df173c2ca400563cb545a73c0ab5b | |
parent | 62739e477e4fd28258324c5d40a1455644a0924b (diff) |
get rid of build warnings
-rw-r--r-- | src/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } |