[Webkit-unassigned] [Bug 68166] unsigned bit shift fails under certain conditions - REPRODUCIBLE

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 16 00:09:56 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=68166





--- Comment #3 from keith.thorne at nokia.com  2011-09-16 00:09:56 PST ---
Okay, my bad, I should have double checked the snippet in the console before posting. This here snippet breaks as it should, in the console as well:

var encodeNumber = function(target, bytes, value) {
    var i = 0;

    for( ; i < bytes; i++ ) {
        target.push((value >>> (i * 8)) % 256);
    }
}

var target = [];
var bytes = 4;
var value = -1699021058.648747;
encodeNumber(target, bytes, value);
console.log(target);

(This mirrors more the code that I am working with). The first value of the array (-2) is the problem value.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list