From 9671f7f52df2425bfa922e8057e4116efb93d1da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kornel=20Lesi=C5=84ski?= Date: Thu, 18 Feb 2016 19:28:03 +0100 Subject: [PATCH] Fixed duplicated appcast item properties Corrected scope of per-node objects --- Sparkle/SUAppcast.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sparkle/SUAppcast.m b/Sparkle/SUAppcast.m index 63f746e6..ac1c43bb 100644 --- a/Sparkle/SUAppcast.m +++ b/Sparkle/SUAppcast.m @@ -135,14 +135,14 @@ return nil; } - NSEnumerator *nodeEnum = [xmlItems objectEnumerator]; - - NSXMLNode *node; - NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary]; - NSMutableDictionary *dict = [NSMutableDictionary dictionary]; NSMutableArray *appcastItems = [NSMutableArray array]; + NSEnumerator *nodeEnum = [xmlItems objectEnumerator]; + NSXMLNode *node; while((node = [nodeEnum nextObject])) { + NSMutableDictionary *nodesDict = [NSMutableDictionary dictionary]; + NSMutableDictionary *dict = [NSMutableDictionary dictionary]; + // First, we'll "index" all the first-level children of this appcast item so we can pick them out by language later. if ([[node children] count]) { node = [node childAtIndex:0];