dolphindb 2.0.904 → 2.0.905
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser.js +6 -2
- package/browser.js.map +1 -1
- package/docs.en.json +946 -59
- package/docs.zh.json +56 -57
- package/i18n/dict.json +6 -0
- package/index.js +6 -2
- package/index.js.map +1 -1
- package/package.json +2 -2
package/browser.js
CHANGED
|
@@ -2499,11 +2499,15 @@ export class DDB {
|
|
|
2499
2499
|
// MSG\n
|
|
2500
2500
|
// <message>\0
|
|
2501
2501
|
// 'M'.codePointAt(0).to_hex_str()
|
|
2502
|
-
if (buf[0] === 0x4d && buf[1] === 0x53 && buf[2] === 0x47 && buf[3] === 0x0a)
|
|
2502
|
+
if (buf[0] === 0x4d && buf[1] === 0x53 && buf[2] === 0x47 && buf[3] === 0x0a) {
|
|
2503
|
+
assert(buf.at(-1) === 0, t('print 消息的 buffer 应该以 \\0 结束'));
|
|
2504
|
+
if (buf.indexOf(0) !== buf.length - 1)
|
|
2505
|
+
console.warn(t('print 消息的 buffer 中间不应该有 \\0'));
|
|
2503
2506
|
return {
|
|
2504
2507
|
type: 'print',
|
|
2505
|
-
data: this.dec.decode(buf.subarray(4))
|
|
2508
|
+
data: this.dec.decode(buf.subarray(4, -1))
|
|
2506
2509
|
};
|
|
2510
|
+
}
|
|
2507
2511
|
// '1166953221 1 1\n'
|
|
2508
2512
|
// 'OK\n'
|
|
2509
2513
|
// '\x04\x00\x02\x00\x00\x00'
|