Bug 718679 - ipToString in nsWifiWorker.js uses wrong byte order, r=mrbkap

This commit is contained in:
Michael Wu 2012-01-18 13:22:12 -08:00
parent f37ba5fbc2
commit 3ba2497f76

View File

@ -757,10 +757,10 @@ var WifiManager = (function() {
}
function ipToString(n) {
return String((n & (0xff << 24)) >> 24) + "." +
((n & (0xff << 16)) >> 16) + "." +
((n & (0xff << 8)) >> 8) + "." +
((n & (0xff << 0)) >> 0);
return String((n >> 0) & 0xFF) + "." +
((n >> 8) & 0xFF) + "." +
((n >> 16) & 0xFF) + "." +
((n >> 24) & 0xFF);
}
manager.enableNetwork = function(netId, disableOthers, callback) {