hush: fix 'eval ""' handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
992e0ff7e9
commit
78c9c736ab
3
shell/ash_test/ash-misc/eval2.right
Normal file
3
shell/ash_test/ash-misc/eval2.right
Normal file
@ -0,0 +1,3 @@
|
||||
Zero:0
|
||||
Zero:0
|
||||
Zero:0
|
4
shell/ash_test/ash-misc/eval2.tests
Executable file
4
shell/ash_test/ash-misc/eval2.tests
Executable file
@ -0,0 +1,4 @@
|
||||
false; eval; echo Zero:$?
|
||||
false; eval ""; echo Zero:$?
|
||||
false; eval "
|
||||
"; echo Zero:$?
|
@ -5679,7 +5679,7 @@ static char* expand_strvec_to_string(char **argv)
|
||||
n++;
|
||||
}
|
||||
}
|
||||
overlapping_strcpy((char*)list, list[0]);
|
||||
overlapping_strcpy((char*)list, list[0] ? list[0] : "");
|
||||
debug_printf_expand("strvec_to_string='%s'\n", (char*)list);
|
||||
return (char*)list;
|
||||
}
|
||||
|
3
shell/hush_test/hush-misc/eval2.right
Normal file
3
shell/hush_test/hush-misc/eval2.right
Normal file
@ -0,0 +1,3 @@
|
||||
Zero:0
|
||||
Zero:0
|
||||
Zero:0
|
4
shell/hush_test/hush-misc/eval2.tests
Executable file
4
shell/hush_test/hush-misc/eval2.tests
Executable file
@ -0,0 +1,4 @@
|
||||
false; eval; echo Zero:$?
|
||||
false; eval ""; echo Zero:$?
|
||||
false; eval "
|
||||
"; echo Zero:$?
|
Loading…
Reference in New Issue
Block a user