Fix two regressions introduced with r26192 (FS#10976 - make the string translatable): * The translation was done too early: before the tagnavi format clauses were checked. This prevented comparisons against "" when a non-English translation was active. * The code overwrote the buffer containing the constant string "" with the translation. This is neither safe nor necessary: The result pointer simply can be swapped with a pointer to the translation. --- apps/tagtree.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/tagtree.c b/apps/tagtree.c index e7f7031..1924da8 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1228,12 +1228,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) { @@ -1258,6 +1252,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]; -- 1.7.1