diff mcabber/src/screen.c @ 1357:7bbfb0073f88

Fix an UTF-8 problem in new hook_execute_internal() function There could be a double UTF-8 encoding, if the user has a non-utf8 locale. BTW improve bindcommand() -- unnecessary string duplication.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Nov 2007 11:29:16 +0100
parents 9716cf8a0726
children 7daf906fbcdc
line wrap: on
line diff
--- a/mcabber/src/screen.c	Sat Nov 10 23:23:44 2007 +0100
+++ b/mcabber/src/screen.c	Sun Nov 11 11:29:16 2007 +0100
@@ -3678,13 +3678,10 @@
   boundcmd = settings_get(SETTINGS_TYPE_BINDING, asciikey);
 
   if (boundcmd) {
-    gchar *cmdline, *boundcmd_locale;
-    boundcmd_locale = from_utf8(boundcmd);
-    cmdline = g_strdup_printf(mkcmdstr("%s"), boundcmd_locale);
+    gchar *cmdline = from_utf8(boundcmd);
     scr_CheckAutoAway(TRUE);
     if (process_command(cmdline, TRUE))
       return 255; // Quit
-    g_free(boundcmd_locale);
     g_free(cmdline);
     return 0;
   }