In NSMapTable.m the lines 338 to 357 should read:
void *
NSMapGet(NSMapTable *table, const void *key)
{
GSIMapNode n;
if (table == 0)
{
NSWarnFLog(@"Nul table argument supplied");
return 0;
}
n = GSIMapNodeForKey((GSIMapTable)table, (GSIMapKey)key);
if (n == 0)
{
return 0;
}
else
{
return n->value.ptr;
}
}
instead of:
void *
NSMapGet(NSMapTable *table, const void *key)
{
GSIMapNode n = GSIMapNodeForKey((GSIMapTable)table, (GSIMapKey)key);
if (table == 0)
{
NSWarnFLog(@"Nul table argument supplied");
return 0;
}
n = GSIMapNodeForKey((GSIMapTable)table, (GSIMapKey)key);
if (n == 0)
{
return 0;
}
else
{
return n->value.ptr;
}
}
otherwise GSIMapNodeForKey might be invoked with an empty table argument
which results in a BUS ERROR because GSIMapNodeForKey is not protected
against an empty table argument. I guess the code:
if (table == 0)
{
NSWarnFLog(@"Nul table argument supplied");
return 0;
}
is meant to do that BEFORE GSIMapNodeForKey is invoked and the code in
line 341 was just overseen.
greetings, Lars
_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep