fix RamdiskDelete+FloppyDelete, they worked incorrectly since their introduction in r171

git-svn-id: svn://kolibrios.org@3442 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
CleverMouse 2013-04-02 14:55:10 +00:00
parent 38cdd04005
commit e61b3f010d
2 changed files with 9 additions and 5 deletions

View File

@ -2257,8 +2257,10 @@ fs_RamdiskDelete:
jmp .lfndel jmp .lfndel
.lfndone: .lfndone:
; delete FAT chain ; delete FAT chain
test eax, eax cmp eax, 2
jz .done jb .done
cmp eax, 0xFF8
jae .done
lea eax, [RAMDISK_FAT + eax*2] lea eax, [RAMDISK_FAT + eax*2]
push dword [eax] push dword [eax]
and word [eax], 0 and word [eax], 0

View File

@ -2257,15 +2257,17 @@ fs_FloppyDelete:
popa popa
; delete FAT chain ; delete FAT chain
pop eax pop eax
test eax, eax
jz .done
@@: @@:
cmp eax, 2
jb .done
cmp eax, 0xFF8
jae .done
lea eax, [FLOPPY_FAT + eax*2] lea eax, [FLOPPY_FAT + eax*2]
push dword [eax] push dword [eax]
and word [eax], 0 and word [eax], 0
pop eax pop eax
and eax, 0xFFF and eax, 0xFFF
jnz @b jmp @b
.done: .done:
call save_flp_fat call save_flp_fat
pop edi pop edi