提交 533f934c 编写于 作者: L lihucheng

Fix the bug : XmlPullParser initialization depends on the ArrayBuffer object...

Fix the bug : XmlPullParser initialization depends on the ArrayBuffer object passed in ending with '\0'
issue: https://gitee.com/openharmony/commonlibrary_ets_utils/issues/I5QYAUSigned-off-by: Nlihucheng <lihucheng1@huawei.com>
上级 e7a3ad60
......@@ -302,7 +302,7 @@ var strXml =
' <todo>Work</todo>' +
' <todo>Play</todo>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var arrayBuffer = new ArrayBuffer(strXml.length);
var bufView = new Uint8Array(arrayBuffer);
var strLen = strXml.length;
for (var i = 0; i < strLen; ++i) {
......@@ -336,7 +336,7 @@ var strXml =
' <todo>Work</todo>' +
' <todo>Play</todo>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var arrayBuffer = new ArrayBuffer(strXml.length);
var bufView = new Uint8Array(arrayBuffer);
var strLen = strXml.length;
for (var i = 0; i < strLen; ++i) {
......
......@@ -301,7 +301,7 @@ var strXml =
' <todo>Work</todo>' +
' <todo>Play</todo>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var arrayBuffer = new ArrayBuffer(strXml.length);
var bufView = new Uint8Array(arrayBuffer);
var strLen = strXml.length;
for (var i = 0; i < strLen; ++i) {
......@@ -335,7 +335,7 @@ var strXml =
' <todo>Work</todo>' +
' <todo>Play</todo>' +
'</note>';
var arrayBuffer = new ArrayBuffer(strXml.length*2);
var arrayBuffer = new ArrayBuffer(strXml.length);
var bufView = new Uint8Array(arrayBuffer);
var strLen = strXml.length;
for (var i = 0; i < strLen; ++i) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册