texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Stop text disappearing in Info nodes with encodin


From: Gavin D. Smith
Subject: branch master updated: Stop text disappearing in Info nodes with encoding conversion
Date: Wed, 08 Feb 2023 17:52:46 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 7e9cf4f55d Stop text disappearing in Info nodes with encoding 
conversion
7e9cf4f55d is described below

commit 7e9cf4f55da7234eb52e408238805866670008ca
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 16fd9a7d71..398c277e80 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-02-08  Gavin Smith <gavinsmith0123@gmail.com>
 
        Unify @multitable block line arg ending
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]