summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2022-10-19 14:36:45 -0300
committerAndrés <andmarti@gmail.com>2022-10-19 14:36:45 -0300
commit2c35058f6ee26a67d9d7585c1fbcf4c4c1ea9579 (patch)
tree99989fdc772e68aa491432e25e9704bcb763f9c7
parent5465be46545b6326a524b9096cbcd332a3d01418 (diff)
removed building warnings
-rw-r--r--src/file.c6
-rw-r--r--src/help.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/file.c b/src/file.c
index 84d8735..8df9970 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]);
+ snprintf(strcolor + strlen(strcolor), strlen(line)-4, " bg=%s", &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);
}
}
diff --git a/src/help.c b/src/help.c
index 805d42e..4148a41 100644
--- a/src/help.c
+++ b/src/help.c
@@ -296,7 +296,7 @@ void help() {
if (d == OKEY_ENTER && strlen(word_looked)) {
find_word(word_looked, 'f');
}
- mvwprintw(input_win, 0, 0, "");
+ wmove(input_win, 0,0);
wclrtoeol(input_win);
wrefresh(input_win);
curs_set(0);