libimg: fix in check of very small files for TGA format

git-svn-id: svn://kolibrios.org@1426 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2010-02-28 19:09:17 +00:00
parent 431a2b2431
commit 1f30a976a3

View File

@ -34,10 +34,10 @@ proc img.is.tga _data, _length ;////////////////////////////////////////////////
;;------------------------------------------------------------------------------------------------;;
;< eax = false / true ;;
;;================================================================================================;;
push ebx
cmp [_length], 18
jbe .nope
mov eax, [_data]
push ebx
mov ebx,[eax+1] ;bl=cmatype,bh=subtype
cmp bl,1 ;cmatype is in [0..1]
ja .nope