Skip to content

Commit

Permalink
Merge pull request #177 from mbystryantsev/patch-1
Browse files Browse the repository at this point in the history
Fix compilation when ZLIB_CONST defined
  • Loading branch information
cen1 authored Mar 3, 2024
2 parents 69bc940 + cb0d448 commit fb4b59b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions quazip/quaziodevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ qint64 QuaZIODevice::readData(char *data, qint64 maxSize)
switch (inflate(&d->zins, Z_SYNC_FLUSH)) {
case Z_OK:
read = reinterpret_cast<char *>(d->zins.next_out) - data;
d->inBufPos = reinterpret_cast<char *>(d->zins.next_in) - d->inBuf;
d->inBufPos = reinterpret_cast<z_const char *>(d->zins.next_in) - d->inBuf;
break;
case Z_STREAM_END:
read = reinterpret_cast<char *>(d->zins.next_out) - data;
d->inBufPos = reinterpret_cast<char *>(d->zins.next_in) - d->inBuf;
d->inBufPos = reinterpret_cast<z_const char *>(d->zins.next_in) - d->inBuf;
d->atEnd = true;
return read;
case Z_BUF_ERROR: // this should never happen, but just in case
Expand Down Expand Up @@ -294,7 +294,7 @@ qint64 QuaZIODevice::writeData(const char *data, qint64 maxSize)
d->zouts.avail_out = QUAZIO_OUTBUFSIZE;
switch (deflate(&d->zouts, Z_NO_FLUSH)) {
case Z_OK:
written = reinterpret_cast<char *>(d->zouts.next_in) - data;
written = reinterpret_cast<z_const char *>(d->zouts.next_in) - data;
d->outBufSize = reinterpret_cast<char *>(d->zouts.next_out) - d->outBuf;
break;
default:
Expand Down

0 comments on commit fb4b59b

Please sign in to comment.