libpkgconf: hopefully the last necessary tweak to quoting...

pull/119/head
William Pitcock 2017-03-29 18:00:57 -05:00
parent 77ca17b6ff
commit 6e643aa432
2 changed files with 6 additions and 4 deletions

View File

@ -88,7 +88,9 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv)
}
else
{
if (!isspace((unsigned int) *src_iter))
if (isspace((unsigned int) *src_iter))
*dst_iter++ = '\\';
*dst_iter++ = *src_iter;
}

View File

@ -387,7 +387,7 @@ fragment_escape(const char *src)
while (*src)
{
if ((*src < ' ') ||
if (((*src < ' ') ||
(*src > ' ' && *src < '$') ||
(*src > '$' && *src < '(') ||
(*src > ')' && *src < '+') ||
@ -396,7 +396,7 @@ fragment_escape(const char *src)
(*src > 'Z' && *src < '^') ||
(*src == '`') ||
(*src > 'z' && *src < '~') ||
(*src > '~'))
(*src > '~')) && *src != '\\')
*dst++ = '\\';
*dst++ = *src++;