#693: Applied patch from Nikolai Saoukh.

v0.27.3
Andreas Huggel 15 years ago
parent 46c2dbf43b
commit c626d7caec

@ -363,7 +363,7 @@ namespace Exiv2 {
long toRead = 0; long toRead = 0;
while (readTotal < colorDataLength) { while (readTotal < colorDataLength) {
toRead = static_cast<long>(colorDataLength - readTotal) < lbuf.size_ toRead = static_cast<long>(colorDataLength - readTotal) < lbuf.size_
? colorDataLength - readTotal : lbuf.size_; ? static_cast<long>(colorDataLength - readTotal) : lbuf.size_;
if (io_->read(lbuf.pData_, toRead) != toRead) throw Error(3, "Photoshop"); if (io_->read(lbuf.pData_, toRead) != toRead) throw Error(3, "Photoshop");
readTotal += toRead; readTotal += toRead;
if (outIo.write(lbuf.pData_, toRead) != toRead) throw Error(21); if (outIo.write(lbuf.pData_, toRead) != toRead) throw Error(21);
@ -470,7 +470,7 @@ namespace Exiv2 {
resourceSize = (resourceSize + 1) & ~1; // pad to even resourceSize = (resourceSize + 1) & ~1; // pad to even
while (readTotal < resourceSize) { while (readTotal < resourceSize) {
toRead = static_cast<long>(resourceSize - readTotal) < lbuf.size_ toRead = static_cast<long>(resourceSize - readTotal) < lbuf.size_
? resourceSize - readTotal : lbuf.size_; ? static_cast<long>(resourceSize - readTotal) : lbuf.size_;
if (io_->read(lbuf.pData_, toRead) != toRead) { if (io_->read(lbuf.pData_, toRead) != toRead) {
throw Error(3, "Photoshop"); throw Error(3, "Photoshop");
} }

Loading…
Cancel
Save