[nautilus-actions] na_boxed_new_from_string_with_sep(): do not eat last character



commit eb562d61a49b43e1313a237791d11e0586f871b8
Author: Pierre Wieser <pwieser trychlos org>
Date:   Wed Jan 19 00:12:27 2011 +0100

    na_boxed_new_from_string_with_sep(): do not eat last character

 ChangeLog           |    3 +++
 src/core/na-boxed.c |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f0b86b4..40042ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
 
 	* NEWS: Update before release.
 
+	* src/core/na-boxed.c (na_boxed_new_from_string_with_sep):
+	Do not eat last character.
+
 	* README-GCONF:
 	* src/core/na-settings.h:
 	* src/utils/na-gconf2key.sh.in:
diff --git a/src/core/na-boxed.c b/src/core/na-boxed.c
index 82e06ca..116f94f 100644
--- a/src/core/na-boxed.c
+++ b/src/core/na-boxed.c
@@ -425,7 +425,7 @@ na_boxed_new_from_string_with_sep( guint type, const gchar *string, const gchar
 			if( string && strlen( string )){
 				sdup = g_strdup( string );
 				if( g_str_has_suffix( string, sep )){
-					sdup[strlen(sdup)-1-strlen(sep)] = '\0';
+					sdup[strlen(sdup)-strlen(sep)] = '\0';
 					sdup = g_strstrip( sdup );
 				}
 				array = g_strsplit( sdup, sep, -1 );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]