update padded user alignment

This commit is contained in:
2022-02-20 09:10:25 +02:00
committed by Motiejus Jakštys
parent 330db487ac
commit 988ab9f6d4
2 changed files with 22 additions and 7 deletions

View File

@@ -10,6 +10,7 @@ const StringContext = std.hash_map.StringContext;
// MaxShells is the maximum number of "popular" shells.
pub const MaxShells = 63;
pub const MaxShellLen = 64;
const ShellAlignment = 2; // bits
// ShellReader interprets "Shell Index" and "Shell Blob" sections.
pub const ShellReader = struct {
@@ -71,7 +72,7 @@ pub const ShellWriter = struct {
});
fullOffset += len;
const padding = pad.roundUpPadding(u12, 2, fullOffset);
const padding = pad.roundUpPadding(u12, ShellAlignment, fullOffset);
fullOffset += padding;
//const stderr = std.io.getStdErr().writer();
//stderr.print("\n", .{}) catch unreachable;