aboutsummaryrefslogtreecommitdiffstats
path: root/libinstaller/syslxmod.c
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2010-05-20 18:24:35 +0800
committerH. Peter Anvin <hpa@zytor.com>2010-05-20 19:57:44 -0700
commit38eb0724824139a81342e3f676910187bc57ba9d (patch)
treeb42e6484a1278b5b037e4f2b0a2cc9bbbb87db75 /libinstaller/syslxmod.c
parentd3e40e850f62da372296e98db701c2dfb202bffc (diff)
downloadsyslinux-38eb0724824139a81342e3f676910187bc57ba9d.tar.gz
syslinux-38eb0724824139a81342e3f676910187bc57ba9d.tar.xz
syslinux-38eb0724824139a81342e3f676910187bc57ba9d.zip
syslinux: fix sector arrays
The first sector ptr is in bs->NextSector not in the array in the patch_area. And actually the ADV sectors counting is wrong for a while ... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller/syslxmod.c')
-rw-r--r--libinstaller/syslxmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c
index e18d8a69..be06b9a2 100644
--- a/libinstaller/syslxmod.c
+++ b/libinstaller/syslxmod.c
@@ -269,7 +269,7 @@ int syslinux_patch(const uint32_t * sectors, int nsectors,
get_16_sl(&patcharea->secptroffset));
nptrs = get_16_sl(&patcharea->secptrcnt);
- while (nsect--) {
+ while (--nsect) { /* the first sector is in bs->NextSector */
set_32_sl(wp++, *sectors++);
nptrs--;
}