aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fix-cumode_space.patch
blob: 9d1e7282488025809b4aad20b26f091f831849e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 35ddd45044388fe1f26e95c43ca0d8bcf30462fe Mon Sep 17 00:00:00 2001
From: Tom Feist <shabble@metavore.org>
Date: Sat, 19 Mar 2011 08:09:37 +0000
Subject: [PATCH] fix bug #795 by setting free_arg parameter correctly to false where the expando
 expansion is a static string.

---
 src/irc/core/irc-expandos.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c
index 0c0da64..df692cc 100644
--- a/src/irc/core/irc-expandos.c
+++ b/src/irc/core/irc-expandos.c
@@ -106,7 +106,13 @@ static char *expando_cumode_space(SERVER_REC *server, void *item, int *free_ret)
                 return "";
 
 	ret = expando_cumode(server, item, free_ret);
-	return *ret == '\0' ? " " : ret;
+
+	if (*ret == '\0') {
+	    free_ret = FALSE;
+	    return " ";
+	} else {
+	    return ret;
+	}
 }
 
 static void event_join(IRC_SERVER_REC *server, const char *data,
-- 
1.7.4.1