summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@redhat.com>2010-11-03 20:40:46 +0100
committerDaniel Veillard <veillard@redhat.com>2010-11-03 20:40:46 +0100
commitad4f0a2dc893cb01af35361c0349227fd6c765b5 (patch)
tree7fd21f62c63ceab489a8acbcd3c1bccfaa9f7ae4 /encoding.c
parent1cc912ec7e5077fd329a4f3c720cdd0981f1133e (diff)
downloadlibxml2-ad4f0a2dc893cb01af35361c0349227fd6c765b5.tar.gz
630140 better fix for iso995x encoding error
Changing semantic of xmlCharEncInFunc() wasn't the proper way to do this, better change UTF8ToISO8859x() appropriately
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/encoding.c b/encoding.c
index 698b8d7a..a68cf21d 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2039,11 +2039,7 @@ retry:
xmlBufferShrink(in, toconv);
out->use += written;
writtentot += written;
- /* multichar cut at end of buffer can generate that problem */
- if (ret == -2) {
- ret = -3;
- }
- }
+ }
out->content[out->use] = 0;
}
#ifdef LIBXML_ICONV_ENABLED
@@ -2319,7 +2315,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
/* trailing byte not in input buffer */
*outlen = out - outstart;
*inlen = processed - instart;
- return(-2);
+ return(-3);
}
c = *in++;
if ((c & 0xC0) != 0x80) {
@@ -2345,7 +2341,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
/* trailing bytes not in input buffer */
*outlen = out - outstart;
*inlen = processed - instart;
- return(-2);
+ return(-3);
}
c1 = *in++;
if ((c1 & 0xC0) != 0x80) {