summaryrefslogtreecommitdiff
path: root/pom.c
diff options
context:
space:
mode:
Diffstat (limited to 'pom.c')
-rw-r--r--pom.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/pom.c b/pom.c
index 118d9d6..9a4028e 100644
--- a/pom.c
+++ b/pom.c
@@ -1,8 +1,3 @@
-/*
-TODO:
-- check for valid UTF-8
-*/
-
#include "pom.h"
#include <stdio.h> // still needed for sprintf, even if POM_NO_STDIO is defined.
@@ -291,7 +286,6 @@ parser_read_to_buf(struct parser *parser, bool skip_bom) {
goto eof;
if (read_count < sizeof parser->buf - 1)
parser->short_read = true;
- parser->utf8_state = utf8_state;
if (parser->leftover_cr && buf[0] != '\n')
parser_error(parser, "Carriage return with no newline after it.");
size_t in = 0, out = 0;
@@ -384,6 +378,7 @@ parser_read_to_buf(struct parser *parser, bool skip_bom) {
}
buf[out++] = byte;
}
+ parser->utf8_state = utf8_state;
parser->line_number = original_line_number;
parser->buf_count = out;
return true;