From a42b4202f2ac1afe6f4926fd45e4e04581437003 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Wed, 25 Apr 2007 19:22:39 +0000 Subject: Fix DCC get when file size is 0, bug #494. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4462 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/dcc/dcc-get.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/irc') diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index fde094f4..bd70c1bc 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -253,6 +253,10 @@ void sig_dccget_connected(GET_DCC_REC *dcc) } dcc->starttime = time(NULL); + if (dcc->size == 0) { + dcc_close(DCC(dcc)); + return; + } dcc->tagread = g_input_add(dcc->handle, G_INPUT_READ, (GInputFunction) sig_dccget_receive, dcc); signal_emit("dcc connected", 1, dcc); -- cgit v1.2.3