mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 22:51:13 +08:00
Make escaping of the empty string return two quotes instead of the empty string
darcs-hash:20070925161959-75c98-1a0409c5fd12c7570e54cbdd9201548c7405196b.gz
This commit is contained in:
parent
5694d3f027
commit
df4fdf33c4
9
common.c
9
common.c
|
@ -739,6 +739,15 @@ wchar_t *escape( const wchar_t *in_orig,
|
||||||
debug( 0, L"%s called with null input", __func__ );
|
debug( 0, L"%s called with null input", __func__ );
|
||||||
FATAL_EXIT();
|
FATAL_EXIT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( wcslen( in ) == 0 )
|
||||||
|
{
|
||||||
|
out = wcsdup(L"''");
|
||||||
|
if( !out )
|
||||||
|
DIE_MEM();
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
out = malloc( sizeof(wchar_t)*(wcslen(in)*4 + 1));
|
out = malloc( sizeof(wchar_t)*(wcslen(in)*4 + 1));
|
||||||
pos = out;
|
pos = out;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user