summaryrefslogtreecommitdiff
path: root/ext/xml/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/xml/xml.c')
-rw-r--r--ext/xml/xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index e345972d5f..6ca7dd9ee4 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -476,7 +476,7 @@ xml_utf8_encode(const char *s, int len, int *newlen, const XML_Char *encoding)
while (pos > 0) {
c = encoder ? encoder((unsigned char)(*s)) : (unsigned short)(*s);
if (c < 0x80) {
- newbuf[(*newlen)++] = c;
+ newbuf[(*newlen)++] = (char) c;
} else if (c < 0x800) {
newbuf[(*newlen)++] = (0xc0 | (c >> 6));
newbuf[(*newlen)++] = (0x80 | (c & 0x3f));