提交 28e0dd84 编写于 作者: J Johannes Rieken

less Buffer

上级 0da533b5
......@@ -672,7 +672,12 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
}
public async $test_down(size: number): Promise<VSBuffer> {
return VSBuffer.wrap(Buffer.alloc(size, Math.random() % 256));
let buff = VSBuffer.alloc(size);
let value = Math.random() % 256;
for (let i = 0; i < size; i++) {
buff.writeUint8(value, i);
}
return buff;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册