[gmime/gmime-2-4] Don't count nul byte as part of string length



commit 67e4fe5fbf1329af963efeca0d360b147e959d3e
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Fri Dec 23 19:35:01 2011 -0500

    Don't count nul byte as part of string length
    
    2011-12-23  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 7628d47..503d68d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-23  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-15  Jeffrey Stedfast  <fejj gnome org>
 
 	* README: Bumped version
diff --git a/gmime/gmime-utils.c b/gmime/gmime-utils.c
index d97316e..389453c 100644
--- a/gmime/gmime-utils.c
+++ b/gmime/gmime-utils.c
@@ -1568,7 +1568,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]