Fixed bug in files container.

This commit is contained in:
vng 2014-08-18 20:54:15 +03:00 committed by Alex Zolotarev
parent 2dd5ba074f
commit accadda17d

View file

@ -44,7 +44,14 @@ protected:
{
bool operator() (Info const & t1, Info const & t2) const
{
return (t1.m_offset < t2.m_offset);
if (t1.m_offset == t2.m_offset)
{
// Element with nonzero size should be the last one,
// for correct append writer mode (FilesContainerW::GetWriter).
return (t1.m_size < t2.m_size);
}
else
return (t1.m_offset < t2.m_offset);
}
bool operator() (Info const & t1, uint64_t const & t2) const
{