diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-08-05 09:05:00 -0700 |
---|---|---|
committer | Brian C. Lane <bcl@redhat.com> | 2019-08-05 09:20:32 -0700 |
commit | d5827cf0606680b4c4e6bf25ac1a4af6e1092f3f (patch) | |
tree | 4d029129c7b9651d858633077293287a40c36987 /libparted/labels | |
parent | 46cd6d7a35ce1431911d85de0604a19a0fc4ff4f (diff) | |
download | parted-d5827cf0606680b4c4e6bf25ac1a4af6e1092f3f.tar.gz |
libparted: Fix endian bug in bsd.c
You have to add 1 *before* doing the endian conversion, not after.
Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'libparted/labels')
-rw-r--r-- | libparted/labels/bsd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libparted/labels/bsd.c b/libparted/labels/bsd.c index f253a32..1e79408 100644 --- a/libparted/labels/bsd.c +++ b/libparted/labels/bsd.c @@ -364,7 +364,7 @@ bsd_write (const PedDisk* disk) max_part = i; } - label->d_npartitions = PED_CPU_TO_LE16 (max_part) + 1; + label->d_npartitions = PED_CPU_TO_LE16 (max_part + 1); label->d_checksum = xbsd_dkcksum (label); alpha_bootblock_checksum (bsd_specific->boot_code); |