[Xfce4-commits] [apps/xfce4-taskmanager] 01/02: Use g_utf8_strlen(text, -1) to check for text length, not sizeof(text) which is the size of a pointer and always > 3

noreply at xfce.org noreply at xfce.org
Sat Nov 29 12:02:17 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 92675eba5350e64362f7e1f3f522bb7b036b9492
Author: Landry Breuil <landry at xfce.org>
Date:   Sat Nov 29 11:41:58 2014 +0100

    Use g_utf8_strlen(text, -1) to check for text length, not sizeof(text) which is the size of a pointer and always > 3
---
 src/task-manager.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/task-manager.c b/src/task-manager.c
index 4619a44..01a45aa 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -138,7 +138,7 @@ static gchar *
 pretty_cmdline (gchar *cmdline, gchar *comm)
 {
 	gchar *text = g_strchomp (g_strdelimit (g_strdup (cmdline), "\n\r", ' '));
-	if (!full_cmdline && sizeof (text) > 3)
+	if (!full_cmdline && g_utf8_strlen (text, -1) > 3)
 	{
 		/* Shorten full path to commands and wine applications */
 		if (text[0] == '/' || (g_ascii_isupper (text[0]) && text[1] == ':' && text[2] == '\\'))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list