Mercurial > pidgin
changeset 1399:51620cc6ec4b
[gaim-migrate @ 1409]
switched the arguments for fread and had it read twice as much
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 10 Jan 2001 02:54:05 +0000 |
parents | f6b0cf1f4c3b |
children | 476b24cdfa32 |
files | src/dialogs.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dialogs.c Tue Jan 09 10:03:48 2001 +0000 +++ b/src/dialogs.c Wed Jan 10 02:54:05 2001 +0000 @@ -2919,13 +2919,14 @@ void do_import(GtkWidget *w, struct gaim_connection *gc) { - char *buf = g_malloc(BUF_LONG); + char *buf = g_malloc(BUF_LONG * 2); char *buf2; char *first = g_malloc(64); char *file; char path[PATHSIZE]; char *g_screenname; int i; + int len; FILE *f; gboolean from_dialog = FALSE; @@ -2993,7 +2994,8 @@ /* GAIM buddy list - no translation */ } else if (first[0] == 'm') { rewind(f); - fread(buf, BUF_LONG, 1, f); + len = fread(buf, 1, BUF_LONG * 2, f); + buf[len] = '\0'; buf2 = buf; buf = g_malloc(8193); g_snprintf(buf, 8192, "toc_set_config {%s}\n", buf2);