mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-05 20:26:30 +00:00
2009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
* commands/loadenv.c (check_blocklists): Fix off-by-one error. (write_blocklists): Likewise.
This commit is contained in:
parent
3e81e9369b
commit
aa0f752dfe
@ -1,3 +1,8 @@
|
||||
2009-09-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* commands/loadenv.c (check_blocklists): Fix off-by-one error.
|
||||
(write_blocklists): Likewise.
|
||||
|
||||
2009-09-01 Colin Watson <cjwatson@ubuntu.com>
|
||||
|
||||
* script/lua/grub_lua.h (fputs): Supply a format string as the first
|
||||
|
@ -242,7 +242,7 @@ check_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
|
||||
part_start = 0;
|
||||
|
||||
buf = grub_envblk_buffer (envblk);
|
||||
for (p = blocklists, index = 0; p; p = p->next, index += p->length)
|
||||
for (p = blocklists, index = 0; p; index += p->length, p = p->next)
|
||||
{
|
||||
char blockbuf[GRUB_DISK_SECTOR_SIZE];
|
||||
|
||||
@ -278,7 +278,7 @@ write_blocklists (grub_envblk_t envblk, struct blocklist *blocklists,
|
||||
part_start = 0;
|
||||
|
||||
index = 0;
|
||||
for (p = blocklists; p; p = p->next, index += p->length)
|
||||
for (p = blocklists; p; index += p->length, p = p->next)
|
||||
{
|
||||
if (grub_disk_write (disk, p->sector - part_start,
|
||||
p->offset, p->length, buf + index))
|
||||
|
Loading…
Reference in New Issue
Block a user