removed several bad casts to 'long'.
The 'long' type should generally be avoided because its size differs on Windows and Linux/Mac so it is almost guaranteed to cause undefined behavior
This commit is contained in:
parent
48ba63c022
commit
ab8711b57a
15 changed files with 29 additions and 27 deletions
|
|
@ -986,7 +986,7 @@ void md5Update(FileReader& file, MD5Context& md5, unsigned len)
|
|||
{
|
||||
t = std::min<unsigned>(len, sizeof(readbuf));
|
||||
len -= t;
|
||||
t = (long)file.Read(readbuf, t);
|
||||
t = (unsigned)file.Read(readbuf, t);
|
||||
md5.Update(readbuf, t);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue