mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 01:21:08 +00:00
Minor fix to ensure string termination when needed
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28329 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fa1051005f
commit
7887e50b9c
1 changed files with 5 additions and 5 deletions
|
@ -1419,15 +1419,15 @@ tables:
|
||||||
done:
|
done:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Post conversion ... set output values.
|
* Post conversion ... terminate if needed, and set output values.
|
||||||
*/
|
*/
|
||||||
|
if (extra != 0 && dst != 0)
|
||||||
|
{
|
||||||
|
ptr[dpos] = (unichar)0;
|
||||||
|
}
|
||||||
*size = dpos;
|
*size = dpos;
|
||||||
if (dst != 0 && (result == YES || (options & GSUniShortOk)))
|
if (dst != 0 && (result == YES || (options & GSUniShortOk)))
|
||||||
{
|
{
|
||||||
if (extra != 0)
|
|
||||||
{
|
|
||||||
ptr[dpos] = (unichar)0;
|
|
||||||
}
|
|
||||||
if (options & GSUniTemporary)
|
if (options & GSUniTemporary)
|
||||||
{
|
{
|
||||||
unsigned bytes = dpos * sizeof(unichar) + extra;
|
unsigned bytes = dpos * sizeof(unichar) + extra;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue