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