(append_quoted): Quote ' correctly.

Problem reported by Eric Blake.
This commit is contained in:
Jim Meyering committed 2005-10-19 07:32:14 +00:00
1 parent 21735a5358
commit dee664c8bb
1 file changed
+7
+7
View File
@@ -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;