diff --git a/src/Cart.cpp b/src/Cart.cpp index 52d482a..ea40df6 100644 --- a/src/Cart.cpp +++ b/src/Cart.cpp @@ -10,7 +10,7 @@ Cart Cart::load_from_disk(const fs::path& path) { EZ_ENSURE(sizeBytes > 0); auto data = std::vector(size_t(sizeBytes)); auto fp = fopen(path.generic_string().c_str(), "rb"); - fread(data.data(), 1, sizeBytes, fp); + ez_assert(sizeBytes == fread(data.data(), 1, sizeBytes, fp)); fclose(fp); return Cart(data.data(), data.size());