KIV: better file extension parsing.

git-svn-id: svn://kolibrios.org@5183 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
hidnplayr 2014-11-21 10:16:47 +00:00
parent bf63b913c5
commit 7199705b05

View File

@ -1,3 +1,5 @@
format binary as ""
use32 use32
org 0x0 org 0x0
@ -617,6 +619,8 @@ load_directory:
jnz @b jnz @b
inc esi inc esi
mov ecx, [esi] mov ecx, [esi]
cmp byte[esi+3], 0
jne .not_3
or ecx, 0x202020 or ecx, 0x202020
cmp ecx, 'jpg' cmp ecx, 'jpg'
jz .copy jz .copy
@ -646,13 +650,15 @@ load_directory:
jz .copy jz .copy
cmp ecx, 'tif' cmp ecx, 'tif'
jz .copy jz .copy
.not_3:
cmp byte[esi+4], 0
jne .nocopy
or ecx, 0x20202020
cmp ecx, 'tiff' cmp ecx, 'tiff'
jz @f jz @f
cmp ecx, 'wbmp' cmp ecx, 'wbmp'
jz @f jz @f
cmp ecx, 'jpeg' cmp ecx, 'jpeg'
jz @f
cmp ecx, 'jpeG'
jnz .nocopy jnz .nocopy
@@: @@:
cmp byte [esi+4], 0 cmp byte [esi+4], 0