diff options
Diffstat (limited to 'protocols/oscar')
| -rw-r--r-- | protocols/oscar/Makefile | 2 | ||||
| -rw-r--r-- | protocols/oscar/oscar.c | 10 | 
2 files changed, 7 insertions, 5 deletions
| diff --git a/protocols/oscar/Makefile b/protocols/oscar/Makefile index 95e85ec2..2792f22a 100644 --- a/protocols/oscar/Makefile +++ b/protocols/oscar/Makefile @@ -17,7 +17,7 @@ LFLAGS += -r  # [SH] Phony targets  all: oscar_mod.o  check: all -lcov: +lcov: check  gcov:  	gcov *.c diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index 9167f6a3..120ebc3e 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -1065,12 +1065,14 @@ static int incomingim_chan1(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_  	} else if (args->mpmsg.numparts == 0) {  		g_snprintf(tmp, BUF_LONG, "%s", args->msg);  	} else { -		int i; +		aim_mpmsg_section_t *part;  		*tmp = 0; -		for (i = 0; i < args->mpmsg.numparts; i ++) { -			g_strlcat(tmp, (char*) args->mpmsg.parts[i].data, BUF_LONG); -			g_strlcat(tmp, "\n", BUF_LONG); +		for (part = args->mpmsg.parts; part; part = part->next) { +			if (part->data) { +				g_strlcat(tmp, (char*) part->data, BUF_LONG); +				g_strlcat(tmp, "\n", BUF_LONG); +			}  		}  	} | 
