Project

General

Profile

Patch #693 ยป src_psdimage.cpp.patch

Nikolai Saoukh, 13 Apr 2010 23:07

View differences:

src/psdimage.cpp (working copy)
363 363
        long toRead = 0;
364 364
        while (readTotal < colorDataLength) {
365 365
            toRead =   static_cast<long>(colorDataLength - readTotal) < lbuf.size_
366
                     ? colorDataLength - readTotal : lbuf.size_;
366
                     ? static_cast<long>(colorDataLength - readTotal) : lbuf.size_;
367 367
            if (io_->read(lbuf.pData_, toRead) != toRead) throw Error(3, "Photoshop");
368 368
            readTotal += toRead;
369 369
            if (outIo.write(lbuf.pData_, toRead) != toRead) throw Error(21);
......
470 470
                resourceSize = (resourceSize + 1) & ~1;        // pad to even
471 471
                while (readTotal < resourceSize) {
472 472
                    toRead =   static_cast<long>(resourceSize - readTotal) < lbuf.size_
473
                             ? resourceSize - readTotal : lbuf.size_;
473
                             ? static_cast<long>(resourceSize - readTotal) : lbuf.size_;
474 474
                    if (io_->read(lbuf.pData_, toRead) != toRead) {
475 475
                        throw Error(3, "Photoshop");
476 476
                    }
    (1-1/1)