ii

git clone https://orangeshoelaces.net/git/ii.git

8fd4887ddb018bf667b65a5683bd1cc73df7004c

Author: Nico Golde on 01/29/2007

Committer: Nico Golde on 01/29/2007

bugfix if fd is NULL

Stats

ii.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/ii.c b/ii.c
index c1b51e8..2e68489 100644
--- a/ii.c
+++ b/ii.c
@@ -221,7 +221,7 @@ static void print_out(char *channel, char *buf)
 	time_t t = time(0);
 
 	create_filepath(outfile, sizeof(outfile), channel, "out");
-	out = fopen(outfile, "a");
+	if(!(out = fopen(outfile, "a"))) return;
 	strftime(buft, sizeof(buft), "%F %R", localtime(&t));
 	fprintf(out, "%s %s\n", buft, buf);
 	fclose(out);