From b08e3b77969e2985d0b37911b0320065eb392d69 Mon Sep 17 00:00:00 2001 From: IgorA Date: Sun, 5 Feb 2017 10:24:40 +0000 Subject: [PATCH] fix bug in 'trees.asm' git-svn-id: svn://kolibrios.org@6855 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/fs/kfar/trunk/zlib/trees.asm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/programs/fs/kfar/trunk/zlib/trees.asm b/programs/fs/kfar/trunk/zlib/trees.asm index d73e5c6aa7..e9cbe989f4 100644 --- a/programs/fs/kfar/trunk/zlib/trees.asm +++ b/programs/fs/kfar/trunk/zlib/trees.asm @@ -672,7 +672,7 @@ align 4 movzx eax,word[f] mov esi,sizeof.ct_data imul esi,ecx - add esi,[tree] ;;;must be [stree] but don't work + add esi,[stree] movzx esi,word[esi+Len] add esi,[xbits] imul eax,esi @@ -1133,10 +1133,11 @@ align 4 add eax,edi inc word[eax+deflate_state.bl_tree+Freq] .end4: - mov dword[count],0 mov eax,[curlen] mov [prevlen],eax - cmp dword[nextlen],0 + xor eax,eax + mov dword[count],eax + cmp dword[nextlen],eax jne .end5 ;if (..==0) mov dword[max_count],138 mov dword[min_count],3 @@ -1166,7 +1167,7 @@ endp ; deflate_state* s ; ct_data *tree ;the tree to be scanned ; int max_code ;and its largest code of non zero frequency -align 4 +align 16 proc send_tree uses eax ebx ecx edi, s:dword, tree:dword, max_code:dword locals n dd ? ;int ;iterates over all tree elements @@ -1263,11 +1264,11 @@ align 4 sub ebx,11 stdcall send_bits, edi, ebx, 7 .end4: - mov dword[curlen],0 mov eax,[curlen] mov [prevlen],eax - mov [nextlen],eax - cmp eax,0 + xor eax,eax + mov dword[count],eax + cmp [nextlen],eax jne .end5 ;if (..==0) mov dword[max_count],138 mov dword[min_count],3