@@ -16,12 +16,10 @@ #include "config.h" #include -#include - #import "OFXMLParser.h" #import "OFString.h" #import "OFArray.h" #import "OFDictionary.h" #import "OFBigDataArray.h" @@ -105,17 +103,14 @@ size_t count = [namespaces count]; if (prefix == nil) prefix = @""; - if (count - 1 > SSIZE_MAX) - @throw [OFOutOfRangeException exception]; - - for (ssize_t i = count - 1; i >= 0; i--) { + while (count > 0) { OFString *tmp; - if ((tmp = [objects[i] objectForKey: prefix]) != nil) + if ((tmp = [objects[--count] objectForKey: prefix]) != nil) return tmp; } return nil; }