diff --git a/Objective-C/main.m b/Objective-C/main.m index 40326b5..6bf99c6 100644 --- a/Objective-C/main.m +++ b/Objective-C/main.m @@ -19,7 +19,7 @@ for(int i = 0; i < input.length; i++) { unichar c = [input characterAtIndex:i]; - c ^= key[i % sizeof(key)/sizeof(unichar)]; + c ^= key[i % (sizeof(key)/sizeof(unichar))]; [output appendString:[NSString stringWithFormat:@"%C", c]]; }