Skip to content

Commit

Permalink
(a bit more uncopypasting)
Browse files Browse the repository at this point in the history
  • Loading branch information
vthriller committed Oct 28, 2013
1 parent df2d98f commit b8cb9c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions makerpm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -630,17 +630,18 @@ mfile make_index1(const std::string& index2, mfile& payload, const std::string&
add_uint32(store.nentries, iheader);
add_uint32(store.store.size(), iheader);

header = iheader + magic + store.index + store.store;

// Align the data to 8 bytes.

size_t n = iheader.size() + magic.size() + store.index.size() + store.store.size();
size_t n = header.size();
size_t q = (8 - (n % 8)) % 8;

while (q > 0) {
store.store += '\0';
header += '\0';
--q;
}

header = iheader + magic + store.index + store.store;
return ret;
}

Expand Down

0 comments on commit b8cb9c9

Please sign in to comment.