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
This commit is contained in:
parent
70b81e65cc
commit
05a1984eb3
1 changed files with 7 additions and 6 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue