# HG changeset patch # User Mark Doliner # Date 1089845240 0 # Node ID b27ab1b8395d840860c7c06e4537bb6a27f2b7eb # Parent 06fe6ed7f63a9c70fea7aab6ff74c3d3c67075b7 [gaim-migrate @ 10359] Fix bug 988882, submitted by Bj?rn Voigt. He also submitted a patch, but I like my way better. Anyhoo, thanks Bj?rn. Also committing some notes to myself because I'm too lazy to remove them and THEN commit. committer: Tailor Script diff -r 06fe6ed7f63a -r b27ab1b8395d src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Wed Jul 14 20:14:48 2004 +0000 +++ b/src/protocols/oscar/oscar.c Wed Jul 14 22:47:20 2004 +0000 @@ -510,7 +510,7 @@ break; } if (tmp) - g_string_append_printf(str, "%s%s", (bit == 1 ? "" : ", "), tmp); + g_string_append_printf(str, "%s%s", (*(str->str) == '\0' ? "" : ", "), tmp); } bit <<= 1; } @@ -3071,6 +3071,7 @@ char *buf = g_malloc(st.st_size); file = fopen(iconfile, "rb"); if (file) { + /* XXX - Use g_file_get_contents() */ int len = fread(buf, 1, st.st_size, file); gaim_debug_info("oscar", "Sending buddy icon to %s (%d bytes, " @@ -4395,6 +4396,7 @@ char *buf = g_malloc(st.st_size); FILE *file = fopen(iconfile, "rb"); if (file) { + /* XXX - Use g_file_get_contents()? */ fread(buf, 1, st.st_size, file); fclose(file); gaim_debug_info("oscar", @@ -5200,6 +5202,7 @@ FILE *file = fopen(iconfile, "rb"); if (file) { char *buf = g_malloc(st.st_size); + /* XXX - Use g_file_get_contents()? */ fread(buf, 1, st.st_size, file); fclose(file); @@ -6527,6 +6530,7 @@ char *buf = g_malloc(st.st_size); FILE *file = fopen(iconfile, "rb"); if (file) { + /* XXX - Use g_file_get_contents()? */ fread(buf, 1, st.st_size, file); fclose(file); gaim_debug_info("oscar", @@ -7033,6 +7037,7 @@ if (file) { md5_state_t *state; char md5[16]; + /* XXX - Use g_file_get_contents()? */ int len = fread(buf, 1, st.st_size, file); fclose(file); state = g_malloc(sizeof(md5_state_t));