forked from len0rd/rockbox
FS#8795 - Fixed fault of the escape processing in Changelog (by Kenjiro Arai).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17178 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5633784f4f
commit
984278b10a
2 changed files with 6 additions and 9 deletions
|
|
@ -3157,17 +3157,13 @@ static bool write_tag(int fd, const char *tagstr, const char *datastr)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
snprintf(buf, sizeof buf, "%s=\"", tagstr);
|
snprintf(buf, sizeof buf, "%s=\"", tagstr);
|
||||||
for (i = strlen(buf); i < (long)sizeof(buf)-3; i++)
|
for (i = strlen(buf); i < (long)sizeof(buf)-4; i++)
|
||||||
{
|
{
|
||||||
if (*datastr == '\0')
|
if (*datastr == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (*datastr == '"')
|
if (*datastr == '"' || *datastr == '\\')
|
||||||
{
|
buf[i++] = '\\';
|
||||||
buf[i] = '\\';
|
|
||||||
datastr++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
buf[i] = *(datastr++);
|
buf[i] = *(datastr++);
|
||||||
}
|
}
|
||||||
|
|
@ -3222,9 +3218,9 @@ static bool read_tag(char *dest, long size,
|
||||||
if (*src == '\0')
|
if (*src == '\0')
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (*src == '\\' && *(src+1) == '"')
|
if (*src == '\\')
|
||||||
{
|
{
|
||||||
dest[pos] = '"';
|
dest[pos] = *(src+1);
|
||||||
src += 2;
|
src += 2;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,7 @@ Christopher Williams
|
||||||
Martin Ritter
|
Martin Ritter
|
||||||
Justin Hannigan
|
Justin Hannigan
|
||||||
Tomasz Wasilczyk
|
Tomasz Wasilczyk
|
||||||
|
Kenjiro Arai
|
||||||
|
|
||||||
|
|
||||||
The libmad team
|
The libmad team
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue