зеркало из https://github.com/mozilla/pjs.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:
Родитель
f5733f4940
Коммит
b3100f8670
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче