mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fix bug in parsing args - a default name without a value should put an empty
string into the defaults dictinary, not attempt to insert a nil object. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3119 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
97143ce253
commit
0c5139b3a8
1 changed files with 2 additions and 2 deletions
|
@ -696,13 +696,13 @@ static NSMutableString *processName = nil;
|
||||||
val = [enumerator nextObject];
|
val = [enumerator nextObject];
|
||||||
if (!val)
|
if (!val)
|
||||||
{ // No more args
|
{ // No more args
|
||||||
[argDict setObject:nil forKey:key];
|
[argDict setObject:@"" forKey:key]; // arg is empty.
|
||||||
done = YES;
|
done = YES;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if ([val hasPrefix:@"-"])
|
else if ([val hasPrefix:@"-"])
|
||||||
{ // Yet another argument
|
{ // Yet another argument
|
||||||
[argDict setObject:nil forKey:key];
|
[argDict setObject:@"" forKey:key]; // arg is empty.
|
||||||
key = val;
|
key = val;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue