mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 00:30:49 +00:00
Fix bug #24883
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27098 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
118ee4598a
commit
d2ea86f5ca
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
|||
2008-11-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSData.m: Fix bug #24883
|
||||
|
||||
2008-11-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: Changes to tolerate older version of gnutls
|
||||
|
|
|
@ -673,11 +673,14 @@ failure:
|
|||
* Copies length bytes of data from the memory encapsulated by the receiver
|
||||
* into the specified buffer. The buffer must be large enough to contain
|
||||
* length bytes of data ... if it isn't then a crash is likely to occur.<br />
|
||||
* Invokes -getBytes:range: with the range set to NSMakeRange(0, length)
|
||||
* If length is greater than the size of the receiver, only the available
|
||||
* bytes are copied.
|
||||
*/
|
||||
- (void) getBytes: (void*)buffer length: (unsigned int)length
|
||||
{
|
||||
[self getBytes: buffer range: NSMakeRange(0, length)];
|
||||
NSUInteger l = [self length];
|
||||
|
||||
[self getBytes: buffer range: NSMakeRange(0, l < length ? l : length)];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue