summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2008-04-19 23:48:13 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2008-04-19 23:48:13 +0000
commit984278b10ac4fd3d124a8110c0d61b01c16bf0b1 (patch)
tree5f7add2cf2e28d7fd8ead7c0bb8f9f6627721779
parent5633784f4f84a082a14c25222fbcf12e03e3b474 (diff)
downloadrockbox-984278b10ac4fd3d124a8110c0d61b01c16bf0b1.tar.gz
rockbox-984278b10ac4fd3d124a8110c0d61b01c16bf0b1.zip
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
-rw-r--r--apps/tagcache.c14
-rw-r--r--docs/CREDITS1
2 files changed, 6 insertions, 9 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index f800c5646b..5ba955f6ce 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -3157,17 +3157,13 @@ static bool write_tag(int fd, const char *tagstr, const char *datastr)
3157 int i; 3157 int i;
3158 3158
3159 snprintf(buf, sizeof buf, "%s=\"", tagstr); 3159 snprintf(buf, sizeof buf, "%s=\"", tagstr);
3160 for (i = strlen(buf); i < (long)sizeof(buf)-3; i++) 3160 for (i = strlen(buf); i < (long)sizeof(buf)-4; i++)
3161 { 3161 {
3162 if (*datastr == '\0') 3162 if (*datastr == '\0')
3163 break; 3163 break;
3164 3164
3165 if (*datastr == '"') 3165 if (*datastr == '"' || *datastr == '\\')
3166 { 3166 buf[i++] = '\\';
3167 buf[i] = '\\';
3168 datastr++;
3169 continue;
3170 }
3171 3167
3172 buf[i] = *(datastr++); 3168 buf[i] = *(datastr++);
3173 } 3169 }
@@ -3222,9 +3218,9 @@ static bool read_tag(char *dest, long size,
3222 if (*src == '\0') 3218 if (*src == '\0')
3223 break; 3219 break;
3224 3220
3225 if (*src == '\\' && *(src+1) == '"') 3221 if (*src == '\\')
3226 { 3222 {
3227 dest[pos] = '"'; 3223 dest[pos] = *(src+1);
3228 src += 2; 3224 src += 2;
3229 continue; 3225 continue;
3230 } 3226 }
diff --git a/docs/CREDITS b/docs/CREDITS
index 279abc087d..6118857b2e 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -386,6 +386,7 @@ Christopher Williams
386Martin Ritter 386Martin Ritter
387Justin Hannigan 387Justin Hannigan
388Tomasz Wasilczyk 388Tomasz Wasilczyk
389Kenjiro Arai
389 390
390 391
391The libmad team 392The libmad team