Fix warning on 32-bit systems

http://hydra.nixos.org/build/44628517
This commit is contained in:
Eelco Dolstra 2016-12-08 20:37:58 +01:00
parent e629a17cc1
commit 88ef77226e
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -52,8 +52,9 @@ struct NarIndexer : ParseSink, StringSource
void preallocateContents(unsigned long long size) override
{
currentStart = string(s, pos, 16);
assert(size <= std::numeric_limits<size_t>::max());
members.emplace(currentPath,
NarMember{FSAccessor::Type::tRegular, isExec, pos, size});
NarMember{FSAccessor::Type::tRegular, isExec, pos, (size_t) size});
}
void receiveContents(unsigned char * data, unsigned int len) override