mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-18 21:02:48 +08:00
Handle setting zero length variable name
darcs-hash:20051207144849-ac50b-d919481d54ef80c68d5f4cc847d5c2370e94ddcc.gz
This commit is contained in:
parent
8b4637e900
commit
a46be4cadb
|
@ -435,6 +435,13 @@ int builtin_set( wchar_t **argv )
|
||||||
{
|
{
|
||||||
dest = wcsdup(argv[woptind++]);
|
dest = wcsdup(argv[woptind++]);
|
||||||
//fwprintf(stderr, L"Dest: %ls\n", dest);
|
//fwprintf(stderr, L"Dest: %ls\n", dest);
|
||||||
|
|
||||||
|
if( !wcslen( dest ) )
|
||||||
|
{
|
||||||
|
free( dest );
|
||||||
|
sb_printf( sb_err, L"%ls: Variable name must not be zero\n", argv[0] );
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Parse values */
|
/* Parse values */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user