512 byte header detection refinement

This commit is contained in:
zsknight
2001-05-22 03:28:10 +00:00
parent 9cc37b1bf1
commit 764b13844e

View File

@@ -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