(wordexp): Explicit null words should be kept.

This commit is contained in:
Ulrich Drepper 1999-11-13 00:44:55 +00:00
parent 0e15452ddf
commit 61027dc82d

View File

@ -2236,6 +2236,14 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
if (error) if (error)
goto do_error; goto do_error;
if (!word_length)
{
error = w_addword (pwordexp, NULL);
if (error)
return error;
}
break; break;
case '\'': case '\'':
@ -2246,6 +2254,14 @@ wordexp (const char *words, wordexp_t *pwordexp, int flags)
if (error) if (error)
goto do_error; goto do_error;
if (!word_length)
{
error = w_addword (pwordexp, NULL);
if (error)
return error;
}
break; break;
case '~': case '~':