You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jan Piotrowski (Sujan) (JIRA)" <ji...@apache.org> on 2018/11/26 15:01:00 UTC

[jira] [Resolved] (CB-4662) Bad code in file autotest?

     [ https://issues.apache.org/jira/browse/CB-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Piotrowski (Sujan) resolved CB-4662.
----------------------------------------
    Resolution: Auto Closed

> Bad code in file autotest?
> --------------------------
>
>                 Key: CB-4662
>                 URL: https://issues.apache.org/jira/browse/CB-4662
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-mobile-spec
>    Affects Versions: 2.9.0
>            Reporter: Peter
>            Assignee: David Kemp
>            Priority: Minor
>
> By inspection, this code in the File autotests seems incorrect
> {code}
>         function arrayBufferEqualsString(buf, str) {
>             var buf = new Uint8Array(ab);
>             var match = buf.length == str.length;
>             for (var i = 0; match && i < buf.length; i++) {
>                 match = buf[i] == str.charCodeAt(i);
>             }
>             return match;
>         }
> {code}
> Where does that _ab_ come from?
> Ref: https://github.com/apache/cordova-mobile-spec/blob/master/autotest/tests/file.tests.js



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org