summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2019-08-19 09:35:29 -0700
committerGitHub <noreply@github.com>2019-08-19 09:35:29 -0700
commita7466613af85cdc2a7cbf367054b0e108a6bd303 (patch)
tree8992de2a3f14722f04cce52db00d8abd08720420
parent676456b9fef0c533357707e722e112f766788394 (diff)
parent4c0c4c5a1c55d7d343e30d06ff5afc0ebf9ef0fd (diff)
downloadfork-ledger-a7466613af85cdc2a7cbf367054b0e108a6bd303.tar.gz
fork-ledger-a7466613af85cdc2a7cbf367054b0e108a6bd303.tar.bz2
fork-ledger-a7466613af85cdc2a7cbf367054b0e108a6bd303.zip
Switch from using utf8::is_bom to utf8::starts_with_bom (#1817)
Switch from using utf8::is_bom to utf8::starts_with_bom
-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 {