fix(e2e): zero log tail buffers · openclaw/openclaw@46f5905
vincentkoc
·
2026-05-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,7 @@ function readSlice(filePath, start, length) {
|
13 | 13 | } |
14 | 14 | const fd = fs.openSync(filePath, "r"); |
15 | 15 | try { |
16 | | -const buffer = Buffer.allocUnsafe(length); |
| 16 | +const buffer = Buffer.alloc(length); |
17 | 17 | const bytesRead = fs.readSync(fd, buffer, 0, length, start); |
18 | 18 | return buffer.subarray(0, bytesRead).toString("utf8"); |
19 | 19 | } finally { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ function readSlice(filePath, start, length) {
|
15 | 15 | } |
16 | 16 | const fd = fs.openSync(filePath, "r"); |
17 | 17 | try { |
18 | | -const buffer = Buffer.allocUnsafe(length); |
| 18 | +const buffer = Buffer.alloc(length); |
19 | 19 | const bytesRead = fs.readSync(fd, buffer, 0, length, start); |
20 | 20 | return buffer.subarray(0, bytesRead).toString("utf8"); |
21 | 21 | } finally { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。