diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-21 19:01:47 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-21 19:01:47 -0700 |
commit | a180c863ac4b6882f47e5e05ceeebe94b1208a7d (patch) | |
tree | d1e5591a6075f67359f792438f848cd15e834bc9 /src/support/file.cpp | |
parent | 7b180b286a3df1a231454399869516ae8571d9bb (diff) | |
parent | 171668684ad91dc8d397ef411ce5fd337bc7a976 (diff) | |
download | binaryen-a180c863ac4b6882f47e5e05ceeebe94b1208a7d.tar.gz binaryen-a180c863ac4b6882f47e5e05ceeebe94b1208a7d.tar.bz2 binaryen-a180c863ac4b6882f47e5e05ceeebe94b1208a7d.zip |
Merge pull request #377 from WebAssembly/zero_x_b
More 0xb work
Diffstat (limited to 'src/support/file.cpp')
-rw-r--r-- | src/support/file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/file.cpp b/src/support/file.cpp index b71361d99..ef014e59a 100644 --- a/src/support/file.cpp +++ b/src/support/file.cpp @@ -37,7 +37,7 @@ T wasm::read_file(const std::string &filename, Flags::BinaryOption binary, Flags std::cerr << "Failed opening '" << filename << "': Input file too large: " << insize << " bytes. Try rebuilding in 64-bit mode." << std::endl; exit(EXIT_FAILURE); } - T input(size_t(insize) + 1, '\0'); + T input(size_t(insize) + (binary == Flags::Binary ? 0 : 1), '\0'); infile.seekg(0); infile.read(&input[0], insize); return input; |