diff options
Diffstat (limited to 'xmake/modules/private/utils/bin2c.lua')
| -rw-r--r-- | xmake/modules/private/utils/bin2c.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/private/utils/bin2c.lua b/xmake/modules/private/utils/bin2c.lua index c6022eba0..91ea1eafe 100644 --- a/xmake/modules/private/utils/bin2c.lua +++ b/xmake/modules/private/utils/bin2c.lua @@ -81,9 +81,10 @@ function _do_bin2c(binarypath, outputpath, opt) print("generating code data file from %s ..", binarypath) -- do dump - local binarydata = bytes(io.readfile(binarypath)) + local binarydata = bytes(io.readfile(binarypath, {encoding = "binary"})) local outputfile = io.open(outputpath, 'w') if outputfile then + binarydata = binarydata .. bytes('\0') _do_dump(binarydata, outputfile, opt) outputfile:close() end |
