From 1548de7c2a417fceb271b001ff8446c2385c4a8c Mon Sep 17 00:00:00 2001 From: "Mihail Semenyako (mike.dld)" Date: Fri, 8 Feb 2008 20:13:33 +0000 Subject: [PATCH] libs-dev: fixed incorrect GIF processing git-svn-id: svn://kolibrios.org@722 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../develop/libraries/libs-dev/libimg/gif/gif.asm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/programs/develop/libraries/libs-dev/libimg/gif/gif.asm b/programs/develop/libraries/libs-dev/libimg/gif/gif.asm index 424e216035..7e6661da73 100644 --- a/programs/develop/libraries/libs-dev/libimg/gif/gif.asm +++ b/programs/develop/libraries/libs-dev/libimg/gif/gif.asm @@ -149,6 +149,8 @@ endl or eax, eax jz .error + xor ecx, ecx + mov eax, [edx + Image.Extended] test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag jz @f mov cl, [ebx + gif.ImageDescriptor.Packed] @@ -163,11 +165,12 @@ endl or eax, eax jz .error mov [edx + Image.Extended], eax - lea esi, [ebx + sizeof.gif.ImageDescriptor] - lea edi, [eax + sizeof.gif.Image] + @@: mov esi, ebx + lea edi, [eax + sizeof.gif.GraphicsControlExtension] + add ecx, sizeof.gif.ImageDescriptor rep movsb - @@: mov eax, [global_color_table] + mov eax, [global_color_table] test [ebx + gif.ImageDescriptor.Packed], gif.ID.Packed.LocalColorTableFlag jz @f lea eax, [ebx + sizeof.gif.ImageDescriptor] @@ -293,10 +296,10 @@ proc img.decode.gif._.process_extensions ;////////////////////////////////////// jmp .next_ext_block .next_ext_block: - mov al, [ebx + gif.Block.Introducer] + mov al, [esi + gif.Block.Introducer] cmp al, gif.Block.Introducer.EndOfData jne .exit - inc ebx + inc esi jmp .next_block .exit: