summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>2002-06-06 01:15:03 +0000
committerhpa <hpa>2002-06-06 01:15:03 +0000
commitff925de6d538f8f95c375cba28f8616d19aee179 (patch)
tree6b8e60b4d94a6d16e98a1f92a0d17e8aedca073f /ldlinux.asm
parentd1d4e23bdcd95618370557b2b7e6287660819fcf (diff)
downloadsyslinux-ff925de6d538f8f95c375cba28f8616d19aee179.tar.gz
Clean up major bugs in the extension-detection code.
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm11
1 files changed, 6 insertions, 5 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index 9107334f..008a82f8 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -1329,16 +1329,17 @@ kernel_good:
popa
mov ecx,[KernelName+8] ; Get (mangled) extension
+ and ecx,00ffffffh ; 3 bytes only
cmp ecx,'COM'
- je near is_comboot_image
+ je is_comboot_image
cmp ecx,'CBT'
- je near is_comboot_image
+ je is_comboot_image
cmp ecx,'BS '
- je near is_bootsector
+ je is_bootsector
cmp ecx,'BIN'
- je near is_bootsector
+ je is_bootsector
cmp ecx,'BSS'
- je near is_bss_sector
+ je is_bss_sector
; Otherwise Linux kernel
;