From 9b7b401455e455121a3aa305810ffa6c084d8081 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Tue, 12 Nov 2013 16:53:41 -0500 Subject: [PATCH] small fix --- src/chat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat.c b/src/chat.c index bfd4a3b..0f6d318 100644 --- a/src/chat.c +++ b/src/chat.c @@ -147,7 +147,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil return; } - /* Append current time to duplicate file names */ + /* Append a number to duplicate file names */ FILE *filecheck = NULL; int count = 1; int len = strlen(filename); @@ -159,7 +159,7 @@ static void chat_onFileSendRequest(ToxWindow *self, Tox *m, int num, uint8_t fil strcat(filename, d); filename[len + strlen(d)] = '\0'; - if (count > 999999) { + if (count >= 999999) { wprintw(ctx->history, "Error saving file to disk.\n"); return; }