mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-21 19:26:09 +03:00
config: repeatablestring must copy values it parses into arena
This commit is contained in:
@ -1176,7 +1176,8 @@ pub const RepeatableString = struct {
|
|||||||
|
|
||||||
pub fn parseCLI(self: *Self, alloc: Allocator, input: ?[]const u8) !void {
|
pub fn parseCLI(self: *Self, alloc: Allocator, input: ?[]const u8) !void {
|
||||||
const value = input orelse return error.ValueRequired;
|
const value = input orelse return error.ValueRequired;
|
||||||
try self.list.append(alloc, value);
|
const copy = try alloc.dupe(u8, value);
|
||||||
|
try self.list.append(alloc, copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deep copy of the struct. Required by Config.
|
/// Deep copy of the struct. Required by Config.
|
||||||
|
Reference in New Issue
Block a user