From 2f56bd9899ffbb1a4f03d82bc92f6becab50331c Mon Sep 17 00:00:00 2001 From: sisong Date: Wed, 21 Mar 2018 09:16:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86vc=E7=BC=96=E8=AF=91c?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libHDiffPatch/HPatch/patch.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/libHDiffPatch/HPatch/patch.c b/libHDiffPatch/HPatch/patch.c index bfb3830d..a896396e 100644 --- a/libHDiffPatch/HPatch/patch.c +++ b/libHDiffPatch/HPatch/patch.c @@ -1821,11 +1821,13 @@ hpatch_BOOL patch_decompress_repeat_out(const hpatch_TStreamOutput* repeat_out_n hpatch_BOOL hpatch_coverList_open_serializedDiff(hpatch_TCoverList* out_coverList, const hpatch_TStreamInput* serializedDiff){ - assert((out_coverList!=0)&&(out_coverList->ICovers==0)); - TByte* temp_cache=out_coverList->_buf; - TByte* temp_cache_end=temp_cache+sizeof(out_coverList->_buf); + TByte* temp_cache; + TByte* temp_cache_end; _TPackedCovers* packedCovers=0; _THDiffHead diffHead; + assert((out_coverList!=0)&&(out_coverList->ICovers==0)); + temp_cache=out_coverList->_buf; + temp_cache_end=temp_cache+sizeof(out_coverList->_buf); if (!_packedCovers_open(&packedCovers,&diffHead,serializedDiff, temp_cache,temp_cache_end)) return _hpatch_FALSE; @@ -1836,11 +1838,13 @@ hpatch_BOOL hpatch_coverList_open_serializedDiff(hpatch_TCoverList* out_coverLis hpatch_BOOL hpatch_coverList_open_compressedDiff(hpatch_TCoverList* out_coverList, const hpatch_TStreamInput* compressedDiff, hpatch_TDecompress* decompressPlugin){ - assert((out_coverList!=0)&&(out_coverList->ICovers==0)); - TByte* temp_cache=out_coverList->_buf; - TByte* temp_cache_end=temp_cache+sizeof(out_coverList->_buf); - hpatch_compressedDiffInfo diffInfo; + TByte* temp_cache; + TByte* temp_cache_end; _TCompressedCovers* compressedCovers=0; + hpatch_compressedDiffInfo diffInfo; + assert((out_coverList!=0)&&(out_coverList->ICovers==0)); + temp_cache=out_coverList->_buf; + temp_cache_end=temp_cache+sizeof(out_coverList->_buf); if (!_compressedCovers_open(&compressedCovers,&diffInfo,compressedDiff,decompressPlugin, temp_cache,temp_cache_end)) return _hpatch_FALSE;