X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/63b1700fd93787682eedc95546a0364f449f036d..c03462c6fed27e26b2bab4b3b34589fa8bf464f8:/apt-pkg/contrib/hashes.cc diff --git a/apt-pkg/contrib/hashes.cc b/apt-pkg/contrib/hashes.cc index af741b672..9b22a90d3 100644 --- a/apt-pkg/contrib/hashes.cc +++ b/apt-pkg/contrib/hashes.cc @@ -30,12 +30,13 @@ bool Hashes::AddFD(int Fd,unsigned long Size) int Res = 0; while (Size != 0) { - Res = read(Fd,Buf,MIN(Size,sizeof(Buf))); - if (Res < 0 || (unsigned)Res != MIN(Size,sizeof(Buf))) + Res = read(Fd,Buf,min(Size,(unsigned long)sizeof(Buf))); + if (Res < 0 || (unsigned)Res != min(Size,(unsigned long)sizeof(Buf))) return false; Size -= Res; MD5.Add(Buf,Res); SHA1.Add(Buf,Res); + SHA256.Add(Buf,Res); } return true; }