Skip to content

Commit 798f321

Browse files
committed
Fix compiler warning
Cast NSUInteger to unsigned long and use %lu format specifier http://useyourloaf.com/blog/2014/04/13/format-string-issue-using-nsinteger.html
1 parent 4ba9c90 commit 798f321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d-ui/CCBReader/CCBReader.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ - (CCNode*) readNodeGraphParent:(CCNode*)parent
12491249
// Class was not found. Maybe it's a Swift class?
12501250
// See http://stackoverflow.com/questions/24030814/swift-language-nsclassfromstring
12511251
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
1252-
NSString *classStringName = [NSString stringWithFormat:@"_TtC%d%@%d%@", appName.length, appName, className.length, className];
1252+
NSString *classStringName = [NSString stringWithFormat:@"_TtC%lu%@%lu%@", (unsigned long)appName.length, appName, (unsigned long)className.length, className];
12531253
class = NSClassFromString(classStringName);
12541254
}
12551255
if (!class)

0 commit comments

Comments
 (0)