changeset 922:c127065adc06

2007-5-4 Brian Masney <masneyb@gftp.org> * lib/protocols.c (_gftp_get_next_charset) - fixed problem when multiple character sets are specified in the remote_charsets variable. (from Shixin Zeng) (partially closes #156371)
author masneyb
date Fri, 04 May 2007 11:25:10 +0000
parents b099517df21a
children 70b7e6663a05
files ChangeLog lib/protocols.c
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 04 11:22:45 2007 +0000
+++ b/ChangeLog	Fri May 04 11:25:10 2007 +0000
@@ -1,4 +1,8 @@
 2007-5-4 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c (_gftp_get_next_charset) - fixed problem when multiple
+	character sets are specified in the remote_charsets variable.
+	(from Shixin Zeng) (partially closes #156371)
+
 	* lib/protocols.c (_do_convert_string) - added two missing continue
 	statements. This fixes a problem converting the string to a different
 	character set. (from Shixin Zeng) (partially closes #156371)
--- a/lib/protocols.c	Fri May 04 11:22:45 2007 +0000
+++ b/lib/protocols.c	Fri May 04 11:25:10 2007 +0000
@@ -433,9 +433,9 @@
   for (; **curpos == ' ' || **curpos == '\t'; (*curpos)++);
 
   if ((endpos = strchr (*curpos, ',')) == NULL)
-    len = strlen (*curpos);
+    len = strlen (*curpos) - 1; /* the trailing ',' should be omitted */
   else
-    len = endpos - *curpos + 1;
+    len = endpos - *curpos;
 
   for (retlen = len - 1;
        (*curpos)[retlen - 1] == ' ' || (*curpos)[retlen - 1] == '\t';