lib/key_master.rb in cocoapods-keys-0.6.1 vs lib/key_master.rb in cocoapods-keys-0.6.2

- old
+ new

@@ -104,11 +104,15 @@ return class_addMethod([self class], name, (IMP)implementation, "@@:"); } <% @keys.each do |key, value| %> static NSString *_podKeys<%= Digest::MD5.hexdigest(key) %>(<%= name %> *self, SEL _cmd) { - char cString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\\0' }; - return [NSString stringWithCString:cString encoding:NSUTF8StringEncoding]; + <% if @indexed_keys.length > 0 %> + char cString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\\0' }; + return [NSString stringWithCString:cString encoding:NSUTF8StringEncoding]; + <% else %> + return @""; + <% end %> } <% end %> static char <%= name %>Data[<%= @data_length %>] = "<%= @data %>";