kfar_arc: bugfix in unpacking of 7z archives

git-svn-id: svn://kolibrios.org@920 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2008-11-14 21:44:53 +00:00
parent 1af612e4d2
commit 09b06cee2f
2 changed files with 11 additions and 5 deletions

View File

@ -2,8 +2,8 @@
; project name: KFar_Arc - plugin for KFar, which supports various archives ; project name: KFar_Arc - plugin for KFar, which supports various archives
; target platform: KolibriOS ; target platform: KolibriOS
; compiler: FASM 1.67.14 ; compiler: FASM 1.67.14
; version: 0.13 ; version: 0.14
; last update: 2008-11-02 (Nov 02, 2008) ; last update: 2008-11-15 (Nov 15, 2008)
; minimal KFar version: 0.41 ; minimal KFar version: 0.41
; minimal kernel: no limit ; minimal kernel: no limit
; ;

View File

@ -274,7 +274,7 @@ end virtual
.repmovsbr: .repmovsbr:
mov eax, [ebp+.rep0] mov eax, [ebp+.rep0]
cmp eax, [ebp+.dictSize] cmp eax, [ebp+.dictSize]
jae return.err ja return.err
mov esi, edi mov esi, edi
sub esi, eax sub esi, eax
mov eax, [ebp+streamInfo.bufPtr] mov eax, [ebp+streamInfo.bufPtr]
@ -282,6 +282,7 @@ end virtual
ja .repmovsb0 ja .repmovsb0
mov eax, [ebp+.outEnd] mov eax, [ebp+.outEnd]
sub eax, edi sub eax, edi
jz .done1
push ecx push ecx
cmp ecx, eax cmp ecx, eax
jb @f jb @f
@ -291,6 +292,7 @@ end virtual
rep movsb rep movsb
pop ecx pop ecx
jz .repmovsb1 jz .repmovsb1
.done1:
pop [ebp+.inPtr] pop [ebp+.inPtr]
mov [ebp+.state], ebx mov [ebp+.state], ebx
mov [ebp+.ecx], ecx mov [ebp+.ecx], ecx
@ -299,8 +301,8 @@ end virtual
ret ret
.repmovsb0: .repmovsb0:
mov edx, [ebp+.dictSize] mov edx, [ebp+.dictSize]
cmp edx, [ebp+streamInfo.bufSize] ; cmp edx, [ebp+streamInfo.bufSize]
jnz return.err ; jnz return.err
add esi, edx add esi, edx
push ecx push ecx
cmp ecx, eax cmp ecx, eax
@ -309,6 +311,7 @@ end virtual
@@: @@:
mov eax, [ebp+.outEnd] mov eax, [ebp+.outEnd]
sub eax, edi sub eax, edi
jz .done2
cmp ecx, eax cmp ecx, eax
jb @f jb @f
mov ecx, eax mov ecx, eax
@ -322,6 +325,9 @@ end virtual
mov al, [edi-1] mov al, [edi-1]
mov [ebp+.previousByte], al mov [ebp+.previousByte], al
jmp .main_loop jmp .main_loop
.done2:
pop ecx
jmp .done1
.main_loop_done: .main_loop_done:
mov [ebp+.state], ebx mov [ebp+.state], ebx
mov [ebp+.continue], .main_loop mov [ebp+.continue], .main_loop