Check size, not length

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/freeze-1_0_0@9530 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-04-06 17:40:16 +00:00
parent efa602b9f2
commit de8fda838a
2 changed files with 5 additions and 2 deletions

View file

@ -2705,7 +2705,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
{
unsigned need = NSMaxRange(aRange);
if (aRange.location > length)
if (aRange.location > size)
{
[NSException raise: NSRangeException
format: @"location bad in replaceByteInRange:withBytes:"];

View file

@ -2,11 +2,14 @@
#include <stdio.h>
#if 0
#if 1
int main ()
{
id pool = [NSAutoreleasePool new];
id o = [NSObject new];
NSLock *lock = [NSLock new];
printf ("Hello from object at 0x%x\n", (unsigned)[o self]);
[lock tryLock];
exit (0);
}
#else