diff options
author | zg0 <zg0@users.noreply.github.com> | 2022-10-18 04:16:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 09:16:23 +0800 |
commit | 374292d175c0dcea8b24fc0dc4c0636e9cc85afa (patch) | |
tree | 5d77d4303a0755871e18180282bb393571159222 | |
parent | caafcb55427150d010d3feefcfd012263a919d25 (diff) | |
download | yuescript-374292d175c0dcea8b24fc0dc4c0636e9cc85afa.tar.gz yuescript-374292d175c0dcea8b24fc0dc4c0636e9cc85afa.tar.bz2 yuescript-374292d175c0dcea8b24fc0dc4c0636e9cc85afa.zip |
skip utf-8 bom. (#110)
-rw-r--r-- | src/yuescript/yuescript.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/yuescript/yuescript.h b/src/yuescript/yuescript.h index 2d2d660..a327387 100644 --- a/src/yuescript/yuescript.h +++ b/src/yuescript/yuescript.h | |||
@@ -40,6 +40,7 @@ yue.read_file = function(fname) | |||
40 | end | 40 | end |
41 | local text = assert(file:read("*a")) | 41 | local text = assert(file:read("*a")) |
42 | file:close() | 42 | file:close() |
43 | if string.sub(text, 1, 3) == "\239\187\191" then text = string.sub(text, 4) end | ||
43 | return text | 44 | return text |
44 | end | 45 | end |
45 | local function get_options(...) | 46 | local function get_options(...) |