summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>2002-04-18 04:39:17 +0000
committerhpa <hpa>2002-04-18 04:39:17 +0000
commit46a3c902406f1e01b38edf8e3ff5b0c1a4cfc31b (patch)
tree29fad76fca45e705543c156ae858f73a33bfe8a7 /ldlinux.asm
parentd24debdb24e11b6a4e341b5cd99c193bffabc0e6 (diff)
downloadsyslinux-46a3c902406f1e01b38edf8e3ff5b0c1a4cfc31b.tar.gz
Fix use of incorrect size for [ClustSize].
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index ad2b7313..bbade43d 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -2843,9 +2843,10 @@ load_high:
jna .size_ok
mov eax,(1 << 16)
.size_ok:
- cdq ; EDX <- 0
+ xor edx,edx
push eax ; Bytes transferred this chunk
- div dword [ClustSize] ; Convert to clusters
+ movzx ecx,word [ClustSize]
+ div ecx ; Convert to clusters
; Round up...
add edx,byte -1 ; Sets CF if EDX >= 1
adc eax,byte 0 ; Add 1 to EAX if CF set