mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Handle setting zero length variable name
darcs-hash:20051207144849-ac50b-d919481d54ef80c68d5f4cc847d5c2370e94ddcc.gz
This commit is contained in:
parent
8b4637e900
commit
a46be4cadb
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue