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:
Steven Michaud 2011-05-11 15:05:28 -05:00
Родитель f5733f4940
Коммит b3100f8670
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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;
}
}
}