1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-12-07 11:36:34 +01:00

some code cleanup

This commit is contained in:
Jfreegman
2014-07-06 23:08:36 -04:00
parent 00e6546f0c
commit 74b84c4252
3 changed files with 8 additions and 8 deletions

View File

@@ -171,8 +171,8 @@ void cmd_sendfile(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv
}
++path;
path[strlen(path) - 1] = L'\0';
int path_len = strlen(path);
int path_len = strlen(path) - 1;
path[path_len] = '\0';
if (path_len > MAX_STR_SIZE) {
errmsg = "File path exceeds character limit.";