summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 6e52942b45..f31811b9a5 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -669,7 +669,7 @@ static void storefile(char* filename, char* setting, int maxlen)
669 ptr--; 669 ptr--;
670 } 670 }
671 671
672 if (strcmp(ROCKBOX_DIR, currdir) || (len > maxlen-extlen)) 672 if (strcmp(ROCKBOX_DIR, currdir) || (len-extlen > maxlen))
673 return; 673 return;
674 674
675 strncpy(setting, filename, len-extlen); 675 strncpy(setting, filename, len-extlen);