summaryrefslogtreecommitdiffstats
path: root/extlinux/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'extlinux/main.c')
-rw-r--r--extlinux/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extlinux/main.c b/extlinux/main.c
index dea2d198..6bf6872d 100644
--- a/extlinux/main.c
+++ b/extlinux/main.c
@@ -561,7 +561,7 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd)
nptrs = get_16(&patcharea->secptrcnt);
memset(wp, 0, nptrs * 4);
- while (nsect--)
+ while (--nsect) /* the first sector in bs->NextSector */
set_32(wp++, *sectp++);
/* Poke in the base directory path */