summaryrefslogtreecommitdiffstats
path: root/apps/tagtree.c
diff options
context:
space:
mode:
authorMichael Hohmuth <sideral@rockbox.org>2011-06-01 08:00:37 +0000
committerMichael Hohmuth <sideral@rockbox.org>2011-06-01 08:00:37 +0000
commit05a1984eb32dd07bcf5d54c147ace4d6f56a00b4 (patch)
tree152da073f90311e0e82ab3b43f0af4a678a40756 /apps/tagtree.c
parent70b81e65cceb83b8933c7da7bdae2ce709404998 (diff)
downloadrockbox-05a1984eb32dd07bcf5d54c147ace4d6f56a00b4.tar.gz
rockbox-05a1984eb32dd07bcf5d54c147ace4d6f56a00b4.zip
FS#12065 - Fix two regressions introduced with r26192 (FS#10976 /
FS#10992 - make the <Untagged> string translatable): * The translation was done too early: before the tagnavi format clauses were checked. This prevented comparisons against "<Untagged>" when a non-English translation was active. * The code overwrote the buffer containing the constant string "<Untagged>" with the translation. This is neither safe nor necessary: The result pointer simply can be swapped with a pointer to the translation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29941 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index d28928dbd5..a1c5640b74 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -1251,12 +1251,6 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init)
if (total_count++ < offset)
continue;
- if ( strcmp(tcs.result , UNTAGGED ) == 0)
- {
- tcs.result_len = strlcpy(tcs.result,
- str(LANG_TAGNAVI_UNTAGGED), TAG_MAXLEN )+1;
- }
-
dptr->newtable = NAVIBROWSE;
if (tag == tag_title || tag == tag_filename)
{
@@ -1281,6 +1275,13 @@ static int retrieve_entries(struct tree_context *c, int offset, bool init)
}
}
+ if (strcmp(tcs.result, UNTAGGED) == 0)
+ {
+ tcs.result = str(LANG_TAGNAVI_UNTAGGED);
+ tcs.result_len = strlen(tcs.result);
+ tcs.ramresult = true;
+ }
+
if (!tcs.ramresult || fmt)
{
char buf[MAX_PATH];