texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Gavin D. Smith
Date: Wed, 8 Feb 2023 18:00:37 -0500 (EST)

branch: release/7.0
commit 9aab5bae68e95738488229506e32c57982168461
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Wed Feb 8 22:52:34 2023 +0000

    Stop text disappearing in Info nodes with encoding conversion
    
    * info/util.c (text_buffer_iconv): Update text buffer length
    after error so that we do not write over the same output again.
---
 ChangeLog   | 7 +++++++
 info/util.c | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 1c4f82bcd7..247c396ab4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-02-08  Gavin Smith <gavinsmith0123@gmail.com>
+
+       Stop text disappearing in Info nodes with encoding conversion
+
+       * info/util.c (text_buffer_iconv): Update text buffer length
+       after error so that we do not write over the same output again.
+
 2023-01-22  Gavin Smith  <gavinsmith0123@gmail.com>
 
        7.0.2 release
diff --git a/info/util.c b/info/util.c
index 46af4ce385..bf02e36d13 100644
--- a/info/util.c
+++ b/info/util.c
@@ -357,6 +357,8 @@ text_buffer_iconv (struct text_buffer *buf, iconv_t 
iconv_state,
 
       iconv_ret = iconv (iconv_state, inbuf, inbytesleft,
                          &outptr, &out_bytes_left);
+      text_buffer_off (buf) = outptr - text_buffer_base (buf);
+
       if (iconv_ret != (size_t) -1)
         break; /* success */
 
@@ -366,7 +368,6 @@ text_buffer_iconv (struct text_buffer *buf, iconv_t 
iconv_state,
       else
         break; /* let calling code deal with it */
     }
-  text_buffer_off (buf) = outptr - text_buffer_base (buf);    
   return iconv_ret;
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]