mirror of
https://github.com/fadden/nulib2.git
synced 2024-12-27 17:29:57 +00:00
If FunnelWrite was called with >16K of data at a point when it had none
buffered, the progress updater (which was only called from FunnelFlush) would never get called. It turns out "deflate" expansion hits this case every time.
This commit is contained in:
parent
8fefff8cfa
commit
8b14fdaef8
@ -572,8 +572,15 @@ Nu_FunnelWrite(NuArchive* pArchive, NuFunnel* pFunnel, const uchar* buffer,
|
||||
* blow out what we were just given or put it at the start of
|
||||
* the buffer.
|
||||
*/
|
||||
err = Nu_FunnelFlush(pArchive, pFunnel);
|
||||
BailError(err);
|
||||
if (pFunnel->bufCount) {
|
||||
err = Nu_FunnelFlush(pArchive, pFunnel);
|
||||
BailError(err);
|
||||
} else {
|
||||
err = Nu_FunnelSendProgressUpdate(pArchive, pFunnel);
|
||||
BailError(err);
|
||||
}
|
||||
|
||||
Assert(pFunnel->bufCount == 0);
|
||||
|
||||
if (count >= kNuFunnelBufSize / 4) {
|
||||
/* it's more than 25% of the buffer, just write it now */
|
||||
|
Loading…
Reference in New Issue
Block a user