[gaim-migrate @ 2664]

Thu, 01 Nov 2001 07:54:48 +0000

author
Eric Warmenhoven <warmenhoven@yahoo.com>
date
Thu, 01 Nov 2001 07:54:48 +0000
changeset 2651
4b6621749f07
parent 2650
9467d506d930
child 2652
850d23f81722

[gaim-migrate @ 2664]
you can't rely on == returning 0 or 1. it will vary depending on compiler and architecture and a number of other things.

src/protocols/irc/irc.c file | annotate | diff | comparison | revisions
--- a/src/protocols/irc/irc.c	Thu Nov 01 06:46:31 2001 +0000
+++ b/src/protocols/irc/irc.c	Thu Nov 01 07:54:48 2001 +0000
@@ -584,7 +584,10 @@
 			break;
 	}
 	
-	id->whois_str = g_string_append(id->whois_str, word_eol[5] + (word_eol[5][0]==':'));
+	if (word_eol[5][0] == ':')
+		id->whois_str = g_string_append(id->whois_str, word_eol[5] + 1);
+	else
+		id->whois_str = g_string_append(id->whois_str, word_eol[5]);
 
 }
 
@@ -612,7 +615,11 @@
 	case 301:
 		if (id->in_whois) {
 			id->whois_str = g_string_append(id->whois_str, "<BR><b>Away: </b>");
-			id->whois_str = g_string_append(id->whois_str, word_eol[5] + (word_eol[5][0]==':'));
+
+			if (word_eol[5][0] == ':')
+				id->whois_str = g_string_append(id->whois_str, word_eol[5] + 1);
+			else
+				id->whois_str = g_string_append(id->whois_str, word_eol[5]);
 		} else
 			irc_got_im(gc, word[4], word_eol[5], IM_FLAG_AWAY, time(NULL));
 		break;

mercurial