summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fitz/base_xml.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fitz/base_xml.c b/fitz/base_xml.c
index ac63659a..d9ae68c1 100644
--- a/fitz/base_xml.c
+++ b/fitz/base_xml.c
@@ -46,8 +46,8 @@ void fz_debug_xml(fz_xml *item, int level)
else {
printf("/>\n");
}
- item = item->next;
}
+ item = item->next;
}
}
@@ -389,6 +389,7 @@ static char *convert_to_utf8(fz_context *doc, unsigned char *s, int n)
int c;
if (s[0] == 0xFE && s[1] == 0xFF) {
+ s += 2;
dst = d = fz_malloc(doc, n * 2);
while (s + 1 < e) {
c = s[0] << 8 | s[1];
@@ -400,6 +401,7 @@ static char *convert_to_utf8(fz_context *doc, unsigned char *s, int n)
}
if (s[0] == 0xFF && s[1] == 0xFE) {
+ s += 2;
dst = d = fz_malloc(doc, n * 2);
while (s + 1 < e) {
c = s[0] | s[1] << 8;