summaryrefslogtreecommitdiff
path: root/macros/texinfo/texinfo/info/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'macros/texinfo/texinfo/info/util.c')
-rw-r--r--macros/texinfo/texinfo/info/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/macros/texinfo/texinfo/info/util.c b/macros/texinfo/texinfo/info/util.c
index 46af4ce385..bf02e36d13 100644
--- a/macros/texinfo/texinfo/info/util.c
+++ b/macros/texinfo/texinfo/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;
}