From 83370c729325eddcb0a1f36c19a91a5ac5951491 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Tue, 23 Jun 2020 13:48:53 +0200 Subject: [PATCH] Fix Windows compilation. --- include/lol/private/sys/file.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lol/private/sys/file.h b/include/lol/private/sys/file.h index baddc840..3ef3fd3b 100644 --- a/include/lol/private/sys/file.h +++ b/include/lol/private/sys/file.h @@ -31,7 +31,7 @@ static inline bool read(std::string const &path, T &data) if (file_size < 0) return false; f.seekg(0, std::ios::beg); - data.resize((file_size + sizeof(U) - 1) / sizeof(U)); + data.resize((size_t(file_size) + sizeof(U) - 1) / sizeof(U)); f.read((char *)data.data(), file_size); return !f.fail(); }