未验证 提交 edf72d43 编写于 作者: O openharmony_ci 提交者: Gitee

!9486 Fix the bug : XmlPullParser initialization depends on the ArrayBuffer...

!9486 Fix the bug : XmlPullParser initialization depends on the ArrayBuffer object passed in endding with '\0'
Merge pull request !9486 from hunili/master
......@@ -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.
先完成此消息的编辑!
想要评论请 注册