mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
(GSToUnicode, GSFromUnicode): Fix setting of dst in some cases.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17176 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04927afede
commit
db7825f0e6
2 changed files with 18 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,10 +1,16 @@
|
|||
2003-07-09 15:54 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/Additions/Unicode.m (GSToUnicode, GSFromUnicode): Make sure
|
||||
dst isn't set to NULL in GSToUnicode, too. Make sure it is set if
|
||||
an allocated buffer turns out not to need resizing.
|
||||
|
||||
2003-07-09 02:41 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSString.m (getCString_u): Rewrite to correctly handle
|
||||
all encodings, the range argument, and the leftoverRange attribute.
|
||||
|
||||
* Source/Unicode.m (GSToUnicode): Clarify the documentation (and fix
|
||||
a few typos in it).
|
||||
* Source/Additions/Unicode.m (GSToUnicode): Clarify the documentation
|
||||
(and fix a few typos in it).
|
||||
(GSFromUnicode): Clarify the documentation. Signal failure correctly
|
||||
from the utf8 encoder. Make sure dst isn't set to NULL if zone is
|
||||
NULL but *size is 0.
|
||||
|
|
|
@ -1330,6 +1330,7 @@ tables:
|
|||
NSZoneFree(zone, ptr);
|
||||
}
|
||||
ptr = r;
|
||||
*dst = ptr;
|
||||
}
|
||||
else if (zone != 0 && (ptr == buf || bsize > dpos))
|
||||
{
|
||||
|
@ -1354,13 +1355,17 @@ tables:
|
|||
{
|
||||
ptr = NSZoneRealloc(zone, ptr, bytes);
|
||||
}
|
||||
*dst = ptr;
|
||||
}
|
||||
else if (ptr == buf)
|
||||
{
|
||||
ptr = NULL;
|
||||
result = NO;
|
||||
}
|
||||
*dst = ptr;
|
||||
else
|
||||
{
|
||||
*dst = ptr;
|
||||
}
|
||||
}
|
||||
else if (ptr != buf && dst != 0 && ptr != *dst)
|
||||
{
|
||||
|
@ -1976,6 +1981,10 @@ tables:
|
|||
ptr = NULL;
|
||||
result = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
*dst = ptr;
|
||||
}
|
||||
}
|
||||
else if (ptr != buf && dst != 0 && ptr != *dst)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue