parent
3afd14c49e
commit
662957ca7d
2
NEWS
2
NEWS
|
@ -12,6 +12,8 @@ Changes from 1.6.0 to 1.6.1:
|
|||
paths.
|
||||
- Use POSIX realpath(3) instead of readlink() for deduplicating the
|
||||
search path. Use _fullpath() on Windows for the same purpose.
|
||||
- The dequoting logic for tuples has been improved to ensure that
|
||||
quotes *inside* a value remain quoted when necessary.
|
||||
|
||||
Changes from 1.5.4 to 1.6.0:
|
||||
----------------------------
|
||||
|
|
|
@ -144,17 +144,18 @@ dequote(const char *value)
|
|||
const char *i;
|
||||
char quote = 0;
|
||||
|
||||
if (*value == '\'' || *value == '"')
|
||||
quote = *value;
|
||||
|
||||
for (i = value; *i != '\0'; i++)
|
||||
{
|
||||
if (!quote && (*i == '\'' || *i == '"'))
|
||||
quote = *i;
|
||||
else if (*i != quote)
|
||||
*bptr++ = *i;
|
||||
else if (*i == '\\' && *(i + 1) == quote)
|
||||
if (*i == '\\' && quote && *(i + 1) == quote)
|
||||
{
|
||||
i++;
|
||||
*bptr++ = *i;
|
||||
}
|
||||
else if (*i != quote)
|
||||
*bptr++ = *i;
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
Loading…
Reference in New Issue