fix bogus NSError generation when deserialising some property lists

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35382 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-08-09 12:58:01 +00:00
parent a27fc66267
commit c280ce26b5
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2012-08-09 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPropertyList.m:
Fix problem considering a lack of whitespace at the end of the
list as an error.
2012-08-08 Riccardo Mottola <rm@gnu.org> 2012-08-08 Riccardo Mottola <rm@gnu.org>
* Tools/AGSParser.m: * Tools/AGSParser.m:

View file

@ -1250,13 +1250,17 @@ static id parsePlItem(pldata* pld)
result = parseUnquotedString(pld); result = parseUnquotedString(pld);
break; break;
} }
if (start == YES && result != nil) if (YES == start && result != nil && nil == pld->err)
{ {
if (skipSpace(pld) == YES) if (skipSpace(pld) == YES)
{ {
pld->err = @"extra data after parsed string"; pld->err = @"extra data after parsed string";
result = nil; // Not at end of string. result = nil; // Not at end of string.
} }
else
{
pld->err = nil; // end expcted
}
} }
return result; return result;
} }