From a20ae57a77332f8c49fdfb0c5536f46c3627d141 Mon Sep 17 00:00:00 2001 From: pjuftring Date: Thu, 31 Mar 2016 19:58:50 +0200 Subject: Repair broken file-size check --- src/support/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/support/file.cpp') 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::max()) { + if (uint64_t(insize) >= std::numeric_limits::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); -- cgit v1.2.3