Changeset View
Changeset View
Standalone View
Standalone View
iso/kiso.cpp
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Line(s) | |||||
207 | 207 | | |||
208 | /* callback function for libisofs */ | 208 | /* callback function for libisofs */ | ||
209 | static int readf(char *buf, unsigned int start, unsigned int len, void *udata) | 209 | static int readf(char *buf, unsigned int start, unsigned int len, void *udata) | ||
210 | { | 210 | { | ||
211 | KRFUNC; | 211 | KRFUNC; | ||
212 | 212 | | |||
213 | QIODevice* dev = (static_cast<KIso*>(udata))->device(); | 213 | QIODevice* dev = (static_cast<KIso*>(udata))->device(); | ||
214 | 214 | | |||
215 | // seek(0) ensures integrity with the QIODevice's built-in buffer | ||||
216 | // see bug #372023 for details | ||||
217 | dev->seek(0); | ||||
218 | | ||||
215 | if (dev->seek((qint64)start << (qint64)11)) { | 219 | if (dev->seek((qint64)start << (qint64)11)) { | ||
216 | if ((dev->read(buf, len << 11u)) != -1) return (len); | 220 | if ((dev->read(buf, len << 11u)) != -1) return (len); | ||
217 | } | 221 | } | ||
218 | //qDebug() << "KIso::ReadRequest failed start: " << start << " len: " << len << endl; | 222 | //qDebug() << "KIso::ReadRequest failed start: " << start << " len: " << len << endl; | ||
219 | 223 | | |||
220 | return -1; | 224 | return -1; | ||
221 | } | 225 | } | ||
222 | 226 | | |||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |