On Sun, 25 Sep 2011 20:07:25 +0200 Colomban Wendling lists.ban@herbesfolles.org wrote:
Le 25/09/2011 18:59, frlan@users.sourceforge.net a écrit :
Revision: 2214 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=2214&view=re... Author: frlan Date: 2011-09-25 16:59:59 +0000 (Sun, 25 Sep 2011) Log Message:
GeanySendMail: Adding a workaround for a weird issue in connection with utils_string_replace_all(). [...] @@ -149,8 +148,11 @@ else { /* Removes %r if option was not activ but was included into command */
utils_string_replace_all(cmd_str,
"%r", NULL);
gchar *tmp_fix;
tmp_fix = g_strdup("");
utils_string_replace_all(cmd_str,
"%r", tmp_fix); g_free(address);
g_free(tmp_fix);
No need to duplicate tmp_fix, passing "" directly is OK, a constant string is expected:
utils_string_replace_all(cmd_str, "%r", "");
Yepp, you are right. Will change it. Thanks for the hint (and I don't tell anybody that I used it this way a couple of time in my other plugins .... ;) )
Cheers, Frank