fix continue crc calculation in 'archiver.obj'

git-svn-id: svn://kolibrios.org@6883 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2017-04-06 06:42:07 +00:00
parent 696f882fc3
commit 6bc316c46e
3 changed files with 8 additions and 8 deletions

View File

@ -174,8 +174,7 @@ if PNG_IO_STATE_SUPPORTED eq 1
end if end if
; Write the crc in a single operation ; Write the crc in a single operation
mov ebx,ebp lea ebx,[ebp-4]
sub ebx,4
stdcall png_save_uint_32, ebx, [edi+png_struct.crc] stdcall png_save_uint_32, ebx, [edi+png_struct.crc]
stdcall png_write_data, edi, ebx, 4 stdcall png_write_data, edi, ebx, 4
@ -3060,13 +3059,9 @@ endl
pushad pushad
mov edi,[png_ptr] mov edi,[png_ptr]
if PNG_WRITE_FILTER_SUPPORTED eq 0 if PNG_WRITE_FILTER_SUPPORTED eq 0
mov eax,[edi+png_struct.row_number]
png_debug1 2, ' (3)= %d', eax
mov eax,[edi+png_struct.rowbytes] mov eax,[edi+png_struct.rowbytes]
inc eax inc eax
stdcall png_write_filtered_row, edi, [edi+png_struct.row_buf], eax stdcall png_write_filtered_row, edi, [edi+png_struct.row_buf], eax
mov eax,[edi+png_struct.row_number]
png_debug1 2, ' (4)= %d', eax
else else
mov esi,[row_info] mov esi,[row_info]
movzx eax,byte[edi+png_struct.do_filter] movzx eax,byte[edi+png_struct.do_filter]
@ -3076,7 +3071,6 @@ else
png_debug 1, 'in png_write_find_filter' png_debug 1, 'in png_write_find_filter'
; Find out how many bytes offset each pixel is ; Find out how many bytes offset each pixel is
movzx eax,byte[edi+png_struct.pixel_depth] movzx eax,byte[edi+png_struct.pixel_depth]
add eax,7 add eax,7

View File

@ -15,6 +15,12 @@ init_crc_table:
jnz .1 jnz .1
ret ret
crc_continue:
; in: eax = pervios crc, ecx = size, esi->buffer
; out: eax = crc
xor eax,-1
jmp crc.loop
crc: crc:
; in: ecx=size, esi->buffer ; in: ecx=size, esi->buffer
; out: eax=crc ; out: eax=crc

View File

@ -115,7 +115,7 @@ end if
mov eax,[p1crc] mov eax,[p1crc]
mov ecx,[len] mov ecx,[len]
push edx push edx
call crc call crc_continue
pop edx pop edx
.end_f: .end_f:
ret ret