mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
fix for bug #42483
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37934 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c33c21b27a
commit
245e957635
4 changed files with 22 additions and 4 deletions
|
@ -256,8 +256,20 @@ int main()
|
|||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
NSString *str;
|
||||
NSString *sub;
|
||||
char buf[10];
|
||||
const char *ptr;
|
||||
char buf[10];
|
||||
|
||||
str = @"a";
|
||||
while ([str length] < 30000)
|
||||
{
|
||||
str = [str stringByAppendingString: str];
|
||||
}
|
||||
if (0 == [str length] % 2)
|
||||
{
|
||||
str = [str stringByAppendingString: @"x"];
|
||||
}
|
||||
ptr = [str cStringUsingEncoding: NSASCIIStringEncoding];
|
||||
|
||||
PASS_EXCEPTION([NSString stringWithUTF8String: 0],
|
||||
NSInvalidArgumentException,
|
||||
"stringWithUTF8String raises for NULL");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue