summaryrefslogtreecommitdiff
path: root/src/htscharset.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/htscharset.c')
-rw-r--r--src/htscharset.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/htscharset.c b/src/htscharset.c
index 26f8d7a..8f96b85 100644
--- a/src/htscharset.c
+++ b/src/htscharset.c
@@ -377,6 +377,7 @@ static char *hts_convertStringToUTF8_(const char *s, size_t size, const char *to
/* Initial size to around the string size */
for(outbufCapa = 16 ; outbufCapa < size + 1 ; outbufCapa *= 2) ;
outbuf = malloc(outbufCapa);
+ outbytesleft = outbufCapa;
/* Convert */
while(outbuf != NULL && inbytesleft != 0) {