forked from KolibriOS/kolibrios
libs-dev: fixed incorrect GIF processing
git-svn-id: svn://kolibrios.org@722 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
15f607fd64
commit
1548de7c2a
@ -149,6 +149,8 @@ endl
|
|||||||
or eax, eax
|
or eax, eax
|
||||||
jz .error
|
jz .error
|
||||||
|
|
||||||
|
xor ecx, ecx
|
||||||
|
mov eax, [edx + Image.Extended]
|
||||||
test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag
|
test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag
|
||||||
jz @f
|
jz @f
|
||||||
mov cl, [ebx + gif.ImageDescriptor.Packed]
|
mov cl, [ebx + gif.ImageDescriptor.Packed]
|
||||||
@ -163,11 +165,12 @@ endl
|
|||||||
or eax, eax
|
or eax, eax
|
||||||
jz .error
|
jz .error
|
||||||
mov [edx + Image.Extended], eax
|
mov [edx + Image.Extended], eax
|
||||||
lea esi, [ebx + sizeof.gif.ImageDescriptor]
|
@@: mov esi, ebx
|
||||||
lea edi, [eax + sizeof.gif.Image]
|
lea edi, [eax + sizeof.gif.GraphicsControlExtension]
|
||||||
|
add ecx, sizeof.gif.ImageDescriptor
|
||||||
rep movsb
|
rep movsb
|
||||||
|
|
||||||
@@: mov eax, [global_color_table]
|
mov eax, [global_color_table]
|
||||||
test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag
|
test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag
|
||||||
jz @f
|
jz @f
|
||||||
lea eax, [ebx + sizeof.gif.ImageDescriptor]
|
lea eax, [ebx + sizeof.gif.ImageDescriptor]
|
||||||
@ -293,10 +296,10 @@ proc img.decode.gif._.process_extensions ;//////////////////////////////////////
|
|||||||
jmp .next_ext_block
|
jmp .next_ext_block
|
||||||
|
|
||||||
.next_ext_block:
|
.next_ext_block:
|
||||||
mov al, [ebx + gif.Block.Introducer]
|
mov al, [esi + gif.Block.Introducer]
|
||||||
cmp al, gif.Block.Introducer.EndOfData
|
cmp al, gif.Block.Introducer.EndOfData
|
||||||
jne .exit
|
jne .exit
|
||||||
inc ebx
|
inc esi
|
||||||
jmp .next_block
|
jmp .next_block
|
||||||
|
|
||||||
.exit:
|
.exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user