mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Make decoding of selectors tolerant.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7906 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c5009fd6f6
commit
351270544e
2 changed files with 36 additions and 6 deletions
|
@ -1121,9 +1121,20 @@ failure:
|
|||
}
|
||||
if (sel == 0)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"can't find sel with name '%s' "
|
||||
@"and types '%s'", name, types];
|
||||
if (lt)
|
||||
{
|
||||
sel = sel_register_typed_name(name, types);
|
||||
}
|
||||
else
|
||||
{
|
||||
sel = sel_register_name(name);
|
||||
}
|
||||
if (sel == 0)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"can't make sel with name '%s' "
|
||||
@"and types '%s'", name, types];
|
||||
}
|
||||
}
|
||||
*(SEL*)data = sel;
|
||||
}
|
||||
|
@ -2187,9 +2198,20 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
}
|
||||
if (sel == 0)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"can't find sel with name '%s' "
|
||||
@"and types '%s'", name, types];
|
||||
if (lt)
|
||||
{
|
||||
sel = sel_register_typed_name(name, types);
|
||||
}
|
||||
else
|
||||
{
|
||||
sel = sel_register_name(name);
|
||||
}
|
||||
if (sel == 0)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"can't make sel with name '%s' "
|
||||
@"and types '%s'", name, types];
|
||||
}
|
||||
}
|
||||
*(SEL*)data = sel;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue