aboutsummaryrefslogtreecommitdiffstats
path: root/camel/string-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/string-utils.c')
-rw-r--r--camel/string-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/camel/string-utils.c b/camel/string-utils.c
index 3f9ce4805d..7cd9e97af0 100644
--- a/camel/string-utils.c
+++ b/camel/string-utils.c
@@ -245,7 +245,8 @@ string_trim (gchar *string, const gchar *trim_chars, StringTrimOption options)
string, first_ok, last_ok);
if (first_ok > 0)
- memmove (string, string+first_ok, last_ok - first_ok +2);
+ memmove (string, string+first_ok, last_ok - first_ok + 1);
+ string[last_ok - first_ok +1] = '\0';
}