mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Do the same stupid thing Apple does (return NO), rather than the stupid thing we were doing (segfault), when passing a proxy as the argument to [NSString isEqualToString:] (which is called by [NSConstantString isEqualToString:] when the argument is a proxy).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31003 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c86696f8f7
commit
3f1a92959d
1 changed files with 7 additions and 0 deletions
|
@ -2179,6 +2179,13 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
if ([self hash] != [aString hash])
|
||||
return NO;
|
||||
|
||||
// Note: This is entirely wrong, stupid, and breaks the spirit of
|
||||
// Objective-C. Unfortunately, it's What Apple Does, so we are stuck with
|
||||
// it.
|
||||
if ([aString isProxy] || ![aString isKindOfClass: [self class]])
|
||||
return NO;
|
||||
|
||||
if (strCompNsNs(self, aString, 0, (NSRange){0, [self length]})
|
||||
== NSOrderedSame)
|
||||
return YES;
|
||||
|
|
Loading…
Reference in a new issue