changeset 1162:37257f175ed8

[gaim-migrate @ 1172] why am i committing this? i haven't tested this yet. oh please don't hit :wq committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Tue, 28 Nov 2000 16:11:12 +0000
parents 984cbc219724
children 8f70ecf3e884
files src/rvous.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/rvous.c	Tue Nov 28 16:03:53 2000 +0000
+++ b/src/rvous.c	Tue Nov 28 16:11:12 2000 +0000
@@ -530,6 +530,7 @@
 	char *buf2;
 	char tmp_buf[MSG_LEN];
 	int read_rv;
+	int at;
 	struct file_header fhdr;
 	guint32 rcv = 0;
 	char *c;
@@ -643,10 +644,11 @@
 	sprintf(debug_buff, "Sending file\n");
 	debug_print(debug_buff);
 	fortime = localtime(&st.st_ctime);
-	snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld %s\r\n",
+	at = g_snprintf(buf, ntohl(fhdr.size) + 1, "%2d/%2d/%4d %2d:%2d %8ld ",
 			fortime->tm_mon + 1, fortime->tm_mday, fortime->tm_year + 1900,
 			fortime->tm_hour + 1, fortime->tm_min + 1,
-			st.st_size, c);
+			st.st_size);
+	g_snprintf(buf + at, ntohl(fhdr.size) + 1 - at, "%s\r\n", c);
 	sprintf(debug_buff, "Sending listing.txt (%d bytes) to %s\n",
 			ntohl(fhdr.size) + 1, ft->user);
 	debug_print(debug_buff);