[vlc-devel] [PATCH 02/12] fixed array access in modules/gui/macos/AppleRemote.m
Benedikt Bergenthal
benedikt at kdrennert.de
Fri May 10 18:47:51 CEST 2013
diff --git a/modules/gui/macosx/AppleRemote.m b/modules/gui/macosx/AppleRemote.m
index b526a60..06d4af2 100644
--- a/modules/gui/macosx/AppleRemote.m
+++ b/modules/gui/macosx/AppleRemote.m
@@ -388,8 +388,8 @@ static AppleRemote* sharedInstance=nil;
}
- (void) executeClickCountEvent: (NSArray*) values {
- AppleRemoteEventIdentifier event = [values[0] unsignedIntValue];
- NSTimeInterval eventTimePoint = [values[1] doubleValue];
+ AppleRemoteEventIdentifier event = [[values objectAtIndex:0] unsignedIntValue];
+ NSTimeInterval eventTimePoint = [[values objectAtIndex:1] doubleValue];
BOOL finishedClicking = NO;
int finalClickCount = eventClickCount;
@@ -564,7 +564,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
NSMutableArray *mutableAllCookies = [[NSMutableArray alloc] init];
NSUInteger elementCount = [elements count];
for (NSUInteger i=0; i< elementCount; i++) {
- element = elements[i];
+ element = [elements objectAtIndex:i];
//Get cookie
object = [element valueForKey: (NSString*)CFSTR(kIOHIDElementCookieKey) ];
@@ -610,7 +610,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
NSUInteger cookieCount = [_allCookies count];
for(NSUInteger i=0; i<cookieCount; i++) {
- IOHIDElementCookie cookie = (IOHIDElementCookie)[_allCookies[i] intValue];
+ IOHIDElementCookie cookie = (IOHIDElementCookie)[[_allCookies objectArIndex:i] intValue];
(*queue)->addElement(queue, cookie, 0);
}
--
1.8.2.2
More information about the vlc-devel
mailing list