mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:53:02 +01:00
small fix
This commit is contained in:
parent
5570b7c98a
commit
9b7b401455
@ -147,7 +147,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Append current time to duplicate file names */
|
/* Append a number to duplicate file names */
|
||||||
FILE *filecheck = NULL;
|
FILE *filecheck = NULL;
|
||||||
int count = 1;
|
int count = 1;
|
||||||
int len = strlen(filename);
|
int len = strlen(filename);
|
||||||
@ -159,7 +159,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil
|
|||||||
strcat(filename, d);
|
strcat(filename, d);
|
||||||
filename[len + strlen(d)] = '\0';
|
filename[len + strlen(d)] = '\0';
|
||||||
|
|
||||||
if (count > 999999) {
|
if (count >= 999999) {
|
||||||
wprintw(ctx->history, "Error saving file to disk.\n");
|
wprintw(ctx->history, "Error saving file to disk.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user