mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix bug with invalid character at the end of comment path
This commit is contained in:
@@ -1298,7 +1298,7 @@ pub const Path = struct {
|
||||
var buf = try allocator.alloc(u8, this.text.len + this.pretty.len + 2);
|
||||
bun.copy(u8, buf, this.text);
|
||||
buf.ptr[this.text.len] = 0;
|
||||
var new_pretty = buf[this.text.len + 1 ..];
|
||||
var new_pretty = buf[this.text.len + 1 ..][0..this.pretty.len];
|
||||
bun.copy(u8, buf[this.text.len + 1 ..], this.pretty);
|
||||
var new_path = Fs.Path.init(buf[0..this.text.len]);
|
||||
buf.ptr[buf.len - 1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user