This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new 12a636e7dd Fix for equals method in XMLList
12a636e7dd is described below

commit 12a636e7dde1ad6ea01aaa9dd121bef58feff835
Author: greg-dove <greg.d...@gmail.com>
AuthorDate: Thu May 12 17:24:37 2022 +1200

    Fix for equals method in XMLList
---
 frameworks/projects/XML/src/main/royale/XMLList.as | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/XML/src/main/royale/XMLList.as 
b/frameworks/projects/XML/src/main/royale/XMLList.as
index e5882c9a14..4bf1808f1e 100644
--- a/frameworks/projects/XML/src/main/royale/XMLList.as
+++ b/frameworks/projects/XML/src/main/royale/XMLList.as
@@ -619,10 +619,11 @@ package
                        if (list === undefined && _xmlArray.length == 0) return 
true;
                        if (list instanceof XMLList) {
                                var l:uint = _xmlArray.length;
-                               if ((list as XMLList)._xmlArray.length != l) 
return false;
+                               var other:Array = (list as XMLList)._xmlArray;
+                               if (other.length != l) return false;
 
                                for (var i:uint=0;i<l;i++) {
-                                       if (!((_xmlArray[i] as 
XML).equals((list as XMLList)._xmlArray[i] as XML))) return false;
+                                       if (!((_xmlArray[i] as 
XML).equals(other[i] as XML))) return false;
                                }
                                return true;
                        }

Reply via email to