mirror of
https://github.com/facebook/zstd.git
synced 2025-12-08 00:03:24 -05:00
fixed minor decompression bug in buffered mode
This commit is contained in:
parent
d3cb690156
commit
e4fdad55dc
@ -439,11 +439,16 @@ size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbc, void* dst, size_t* maxDstSizePt
|
|||||||
if (zbc->outBuff == NULL) return ERROR(memory_allocation);
|
if (zbc->outBuff == NULL) return ERROR(memory_allocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memcpy(zbc->inBuff, zbc->headerBuffer, zbc->hPos);
|
if (zbc->hPos)
|
||||||
zbc->inPos = zbc->hPos;
|
{
|
||||||
zbc->hPos = 0;
|
/* some data already loaded into headerBuffer : transfer into inBuff */
|
||||||
zbc->stage = ZBUFFds_load;
|
memcpy(zbc->inBuff, zbc->headerBuffer, zbc->hPos);
|
||||||
break; /* useless : stage follows */
|
zbc->inPos = zbc->hPos;
|
||||||
|
zbc->hPos = 0;
|
||||||
|
zbc->stage = ZBUFFds_load;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
zbc->stage = ZBUFFds_read;
|
||||||
|
|
||||||
case ZBUFFds_read:
|
case ZBUFFds_read:
|
||||||
{
|
{
|
||||||
|
|||||||
@ -68,7 +68,6 @@
|
|||||||
# include "zstd_legacy.h"
|
# include "zstd_legacy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* *******************************************************
|
/* *******************************************************
|
||||||
* Compiler specifics
|
* Compiler specifics
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user