lib/key_master.rb in cocoapods-keys-0.6.2 vs lib/key_master.rb in cocoapods-keys-0.9.0
- old
+ new
@@ -105,10 +105,14 @@
}
<% @keys.each do |key, value| %>
static NSString *_podKeys<%= Digest::MD5.hexdigest(key) %>(<%= name %> *self, SEL _cmd)
{
<% if @indexed_keys.length > 0 %>
- char cString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\\0' };
+ <% if @indexed_keys[key].length > 0 %>
+ char cString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\\0' };
+ <% else %>
+ char cString[1] = { '\\0' };
+ <% end %>
return [NSString stringWithCString:cString encoding:NSUTF8StringEncoding];
<% else %>
return @"";
<% end %>
}