[gmime] Don't count nul byte as part of string length



commit 3fde91fcc06b90b78a3085af0b91ef7699b14a93
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Sun Dec 18 15:42:55 2011 -0500

    Don't count nul byte as part of string length
    
    2011-12-18  Jeffrey Stedfast  <fejj gnome org>
    
    	* gmime/gmime-utils.c (charset_convert): Don't count the
    	terminating nul character in the returned string length.

 ChangeLog           |    5 +++++
 gmime/gmime-utils.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 34eb5e6..f74e28f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-18  Jeffrey Stedfast  <fejj gnome org>
+
+	* gmime/gmime-utils.c (charset_convert): Don't count the
+	terminating nul character in the returned string length.
+
 2011-12-17  Jeffrey Stedfast  <fejj gnome org>
 
 	* README: Bumped version
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index 91a9779..6fc17d6 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -1564,7 +1564,7 @@ charset_convert (iconv_t cd, const char *inbuf, size_t inleft, char **outp, size
 		outbuf = out + rc;
 	}
 	
-	*outbuf++ = '\0';
+	*outbuf = '\0';
 	
 	*outlenp = outlen;
 	*outp = out;



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