From 6e691a3c34ba41f38cf69fb9c9e1daea2762ebd1 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Fri, 29 Nov 2013 10:03:05 -0500 Subject: [PATCH] Fixed possible issue. --- toxcore/Messenger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index 954b31dd..10e36746 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -1161,7 +1161,7 @@ int file_sendrequest(Messenger *m, int friendnumber, uint8_t filenumber, uint64_ int new_filesender(Messenger *m, int friendnumber, uint64_t filesize, uint8_t *filename, uint16_t filename_length) { if (friend_not_valid(m, friendnumber)) - return 0; + return -1; uint32_t i; @@ -1309,7 +1309,7 @@ int file_data(Messenger *m, int friendnumber, uint8_t filenumber, uint8_t *data, * send_receive is 0 if we want the sending files, 1 if we want the receiving. * * return number of bytes remaining to be sent/received on success - * return -1 on failure + * return 0 on failure */ uint64_t file_dataremaining(Messenger *m, int friendnumber, uint8_t filenumber, uint8_t send_receive) {