You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when //it may happened when _[name] and [name] are both exist on XML creation, a name collision may be possible in function - (NSDictionary *)attributes . My use case is using this llbrary as the XML writer .
Found name collision in 64bit simulator, as the sequence [filteredDict allKeys] is indefinite
//it is mean to prevent the key collision issue for xml creation
//I guess the performance impact on this should be minimal
//start patch
for (NSString *key in [filteredDict allKeys])
{
if (![key hasPrefix:XMLDictionaryAttributePrefix])
{
[filteredDict removeObjectForKey:key];
}
}
//end patch
for (NSString *key in [filteredDict allKeys])
{
[filteredDict removeObjectForKey:key];
if ([key hasPrefix:XMLDictionaryAttributePrefix])
{
// currAttriValue= self[key];
filteredDict[[key substringFromIndex:[XMLDictionaryAttributePrefix length]]] = self[key];
}
}
return [filteredDict count]? filteredDict: nil;
}
return nil;
}
The text was updated successfully, but these errors were encountered:
when //it may happened when _[name] and [name] are both exist on XML creation, a name collision may be possible in function - (NSDictionary *)attributes . My use case is using this llbrary as the XML writer .
Found name collision in 64bit simulator, as the sequence [filteredDict allKeys] is indefinite
Fix had been applied as follow , please advice :
(NSDictionary *)attributes
{
NSDictionary *attributes = self[XMLDictionaryAttributesKey];
if (attributes)
{
return [attributes count]? attributes: nil;
}
else
{
NSMutableDictionary *filteredDict = [NSMutableDictionary dictionaryWithDictionary:self];
[filteredDict removeObjectsForKeys:@[XMLDictionaryCommentsKey, XMLDictionaryTextKey, XMLDictionaryNodeNameKey]];
}
return nil;
}
The text was updated successfully, but these errors were encountered: