Minor arg handling tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15096 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-11-25 15:53:52 +00:00
parent 1462498b1f
commit a27e08280b
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-11-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSUserDefaults.m: Treat '-' on its own as an argument
rather than the start of a flag name.
2002-11-20 Richard Frith-Macdonald <rfm@gnu.org>
* Source/libgnustep-base.def: Add garbage collecting classes.

View file

@ -1696,7 +1696,7 @@ static BOOL isPlistObject(id o)
while (!done)
{
if ([key hasPrefix: @"-"])
if ([key hasPrefix: @"-"] == YES && [key isEqual: @"-"] == NO)
{
NSString *old = nil;
@ -1719,7 +1719,7 @@ static BOOL isPlistObject(id o)
done = YES;
continue;
}
else if ([val hasPrefix: @"-"] == YES)
else if ([val hasPrefix: @"-"] == YES && [val isEqual: @"-"] == NO)
{ // Yet another argument
[argDict setObject: @"" forKey: key]; // arg is empty.
if (old != nil)