diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-31 11:08:49 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-31 11:08:49 -0700 |
commit | 57bd72bee0153ad41c9e4f9441cd2cf19ab89d81 (patch) | |
tree | 470c32f72891c81ba4399dca5381e92e537cd60d /src | |
parent | 2a6d8344caa4d52864a08440535eec1752b94302 (diff) | |
parent | a20ae57a77332f8c49fdfb0c5536f46c3627d141 (diff) | |
download | binaryen-57bd72bee0153ad41c9e4f9441cd2cf19ab89d81.tar.gz binaryen-57bd72bee0153ad41c9e4f9441cd2cf19ab89d81.tar.bz2 binaryen-57bd72bee0153ad41c9e4f9441cd2cf19ab89d81.zip |
Merge pull request #301 from pjuftring/file-size_check
Repair broken file-size check
Diffstat (limited to 'src')
-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 c93086990..ba69a1be1 100644 --- a/src/support/file.cpp +++ b/src/support/file.cpp @@ -29,7 +29,7 @@ T wasm::read_file(const std::string &filename, bool debug) { } infile.seekg(0, std::ios::end); std::streampos insize = infile.tellg(); - if (size_t(insize) >= std::numeric_limits<size_t>::max()) { + if (uint64_t(insize) >= std::numeric_limits<size_t>::max()) { // Building a 32-bit executable where size_t == 32 bits, we are not able to create strings larger than 2^32 bytes in length, so must abort here. std::cerr << "Failed opening '" << filename << "': Input file too large: " << insize << " bytes. Try rebuilding in 64-bit mode." << std::endl; exit(EXIT_FAILURE); |