mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Bugfix for serializing selectors.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@5665 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
98f56b39be
commit
febd164742
2 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jan 5 16:22:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSData.m: when serializing selectors, cope with untyped
|
||||
selectors instead of crashing.
|
||||
|
||||
Wed Jan 5 14:37:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSTimeZone.m: Changed order of lookup to determine the local
|
||||
|
|
|
@ -1462,9 +1462,9 @@ failure:
|
|||
case _C_SEL:
|
||||
{
|
||||
const char *name = *(SEL*)data?fastSelectorName(*(SEL*)data):"";
|
||||
gsu16 ln = (gsu16)strlen(name);
|
||||
gsu16 ln = (name == 0) ? 0 : (gsu16)strlen(name);
|
||||
const char *types = *(SEL*)data?fastSelectorTypes(*(SEL*)data):"";
|
||||
gsu16 lt = (gsu16)strlen(types);
|
||||
gsu16 lt = (types == 0) ? 0 : (gsu16)strlen(types);
|
||||
gsu16 ni;
|
||||
|
||||
ni = GSSwapHostI16ToBig(ln);
|
||||
|
@ -2883,9 +2883,9 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
case _C_SEL:
|
||||
{
|
||||
const char *name = *(SEL*)data?fastSelectorName(*(SEL*)data):"";
|
||||
gsu16 ln = (gsu16)strlen(name);
|
||||
gsu16 ln = (name == 0) ? 0 : (gsu16)strlen(name);
|
||||
const char *types = *(SEL*)data?fastSelectorTypes(*(SEL*)data):"";
|
||||
gsu16 lt = (gsu16)strlen(types);
|
||||
gsu16 lt = (types == 0) ? 0 : (gsu16)strlen(types);
|
||||
gsu16 minimum = length + ln + lt + 2*sizeof(gsu16);
|
||||
gsu16 ni;
|
||||
|
||||
|
|
Loading…
Reference in a new issue