summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 258e2560..4e24fd44 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -319,7 +319,9 @@ std::streamsize instance_t::read_line(char *& line)
context.curr_pos = context.line_beg_pos;
context.curr_pos += len;
- if (context.linenum == 0 && utf8::is_bom(context.linebuf)) {
+ if (context.linenum == 0 &&
+ utf8::starts_with_bom(
+ context.linebuf, context.linebuf + sizeof(context.linebuf))) {
line = &context.linebuf[3];
len -= 3;
} else {