Fix use of incorrect size for [ClustSize].
authorhpa <hpa>
Thu, 18 Apr 2002 04:39:17 +0000 (04:39 +0000)
committerhpa <hpa>
Thu, 18 Apr 2002 04:39:17 +0000 (04:39 +0000)
isolinux.asm
ldlinux.asm
pxelinux.asm

index 4f0ef22..80f1cf4 100644 (file)
@@ -2922,9 +2922,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
index ad2b731..bbade43 100644 (file)
@@ -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
index 600eeab..3130bdc 100644 (file)
@@ -2654,9 +2654,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