mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
(append_quoted): Quote ' correctly.
Problem reported by Eric Blake.
This commit is contained in:
1 parent
21735a5358
commit
dee664c8bb
1 file changed
+7
@@ -207,6 +207,13 @@ append_quoted (const char *str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case '\'':
|
||||
APPEND_CHAR ('\'');
|
||||
APPEND_CHAR ('\\');
|
||||
APPEND_CHAR ('\'');
|
||||
need_backslash = true;
|
||||
break;
|
||||
|
||||
case '\\':
|
||||
case '^':
|
||||
need_backslash = !need_backslash;
|
||||
|
||||
Reference in new issue
Block a user