Skip to content

Commit

Permalink
One more arithmetic bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
culler committed Feb 12, 2021
1 parent b37f447 commit 0bbf569
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions append_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ void append_data(
fathead.nfat_arch = 2;
archs = (struct fat_arch *) calloc(fathead.nfat_arch, sizeof(struct fat_arch));
fathead_size = sizeof(fathead) + fathead.nfat_arch * sizeof(struct fat_arch);
fathead_padding = ((fathead_size + 0x3ffe) & 0x3fff) - fathead_size;
fathead_padding = ((fathead_size + 0x3fff) & ~0x3fff) - fathead_size;
if (fathead_padding < 0) {
fathead_padding += 16384;
fathead_padding += 0x4000;
}
struct fat_arch arch = {
.cputype = cputype,
Expand Down

0 comments on commit 0bbf569

Please sign in to comment.