| ... | @@ -557,9 +557,8 @@ pub fn argsAlloc(allocator: mem.Allocator) ![][:0]u8 { | ... | @@ -557,9 +557,8 @@ pub fn argsAlloc(allocator: mem.Allocator) ![][:0]u8 { |
| 557 | | 557 | |
| 558 | const contents_slice = contents.items; | 558 | const contents_slice = contents.items; |
| 559 | const slice_sizes = slice_list.items; | 559 | const slice_sizes = slice_list.items; |
| 560 | const contents_size_bytes = try math.add(usize, contents_slice.len, slice_sizes.len); | | |
| 561 | const slice_list_bytes = try math.mul(usize, @sizeOf([]u8), slice_sizes.len); | 560 | const slice_list_bytes = try math.mul(usize, @sizeOf([]u8), slice_sizes.len); |
| 562 | const total_bytes = try math.add(usize, slice_list_bytes, contents_size_bytes); | 561 | const total_bytes = try math.add(usize, slice_list_bytes, contents_slice.len); |
| 563 | const buf = try allocator.alignedAlloc(u8, @alignOf([]u8), total_bytes); | 562 | const buf = try allocator.alignedAlloc(u8, @alignOf([]u8), total_bytes); |
| 564 | errdefer allocator.free(buf); | 563 | errdefer allocator.free(buf); |
| 565 | | 564 | |