1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-06 09:26:44 +02:00

Fix a few issues

- realloc needs to be error checked
- use correct format specifiers
- make sure optarg and DATA_FILE aren't null before using them
This commit is contained in:
jfreegman
2020-11-02 18:08:54 -05:00
parent e7a0c32a68
commit 1bbd50aac7
8 changed files with 29 additions and 11 deletions

View File

@ -103,7 +103,7 @@ void cmd_groupinvite(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*a
return;
}
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Invited contact to Group %d.", groupnum);
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Invited contact to Group %lu.", groupnum);
}
void cmd_join_group(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])
@ -189,7 +189,7 @@ void cmd_savefile(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
goto on_recv_error;
}
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Saving file [%d] as: '%s'", idx, ft->file_path);
line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "Saving file [%zu] as: '%s'", idx, ft->file_path);
/* prep progress bar line */
char progline[MAX_STR_SIZE];