$OpenBSD: patch-src_irc_core_irc-expandos_c,v 1.1 2011/12/01 17:51:10 sthen Exp $
--- src/irc/core/irc-expandos.c.orig	Wed Nov 16 17:11:24 2011
+++ src/irc/core/irc-expandos.c	Wed Nov 16 17:11:37 2011
@@ -87,11 +87,13 @@ static char *expando_cumode(SERVER_REC *server, void *
 {
 	if (IS_IRC_CHANNEL(item) && CHANNEL(item)->ownnick) {
 		char prefix = NICK(CHANNEL(item)->ownnick)->prefixes[0];
-		char *cumode = g_malloc(2);
-		cumode[0] = prefix;
-		cumode[1] = '\0';
-		*free_ret = TRUE;
-		return cumode; /* will be "\0\0" = "" if there is no prefix */
+		if (prefix != '\0') {
+			char *cumode = g_malloc(2);
+			cumode[0] = prefix;
+			cumode[1] = '\0';
+			*free_ret = TRUE;
+			return cumode;
+		}
 	}
 	return "";
 }
