empty string SHOULD work now if the node is non exiustant to start with

SVN revision: 18053
This commit is contained in:
Carsten Haitzler 2005-10-28 02:46:16 +00:00
parent 2264c5cc58
commit d4db65df1f
1 changed files with 7 additions and 1 deletions

View File

@ -268,7 +268,13 @@ _strbuf_append(char *s, char *s2, int *len, int *alloc)
int l2;
int tlen;
if ((!s2) || (!s2[0])) return s;
if (!s2) return s;
if ((!s) && (s2[0] == 0))
{
*len = 0;
*alloc = 1;
return strdup("");
}
l2 = strlen(s2);
tlen = *len + l2;
if (tlen > *alloc)