зеркало из https://github.com/mozilla/gecko-dev.git
Bug 654725 - Changes in OS X 10.7 break our Wi-Fi monitor code, causing crashes (followup fix). r=josh
This commit is contained in:
Родитель
50063a2798
Коммит
7b86566115
|
@ -112,7 +112,12 @@ GetAccessPointsFromWLAN(nsCOMArray<nsWifiAccessPoint> &accessPoints)
|
|||
if (macString && ([macString length] == 17)) {
|
||||
for (NSUInteger i = 0; i < 6; ++i) {
|
||||
NSString* part = [macString substringWithRange:NSMakeRange(i * 3, 2)];
|
||||
macData[i] = (unsigned char) [part integerValue];
|
||||
NSScanner* scanner = [NSScanner scannerWithString:part];
|
||||
unsigned int data = 0;
|
||||
if (![scanner scanHexInt:&data]) {
|
||||
data = 0;
|
||||
}
|
||||
macData[i] = (unsigned char) data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче