512 byte header detection refinement
This commit is contained in:
@@ -4268,19 +4268,15 @@ NEWSYM loadfileGUI
|
|||||||
or eax,eax
|
or eax,eax
|
||||||
jz near .success2
|
jz near .success2
|
||||||
add dword[.curromspace],eax
|
add dword[.curromspace],eax
|
||||||
mov ecx,eax
|
|
||||||
; shr eax,15
|
|
||||||
; shl eax,15
|
|
||||||
mov esi,[headdata]
|
mov esi,[headdata]
|
||||||
add esi,[.curfileofs]
|
add esi,[.curfileofs]
|
||||||
mov edi,[headdata]
|
mov edi,[headdata]
|
||||||
add edi,[.curfileofs]
|
add edi,[.curfileofs]
|
||||||
add [.curfileofs],eax
|
add [.curfileofs],eax
|
||||||
sub ecx,eax
|
mov ecx,eax
|
||||||
; xor ecx,ecx
|
and ecx,32767
|
||||||
; or ecx,ecx
|
cmp ecx,512
|
||||||
|
je near .yesheader
|
||||||
|
|
||||||
; check if .smc header
|
; check if .smc header
|
||||||
push esi
|
push esi
|
||||||
push eax
|
push eax
|
||||||
@@ -4300,6 +4296,7 @@ NEWSYM loadfileGUI
|
|||||||
pop esi
|
pop esi
|
||||||
cmp ecx,450
|
cmp ecx,450
|
||||||
jb .nomove
|
jb .nomove
|
||||||
|
.yesheader
|
||||||
mov byte[Header512],1
|
mov byte[Header512],1
|
||||||
mov edi,esi
|
mov edi,esi
|
||||||
add edi,512
|
add edi,512
|
||||||
|
|||||||
Reference in New Issue
Block a user