Minor bug fix

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2536 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-10-08 15:45:50 +00:00
parent dea31222b8
commit 5be4d340e4

View file

@ -669,7 +669,7 @@ static void storefile(char* filename, char* setting, int maxlen)
ptr--; ptr--;
} }
if (strcmp(ROCKBOX_DIR, currdir) || (len > maxlen-extlen)) if (strcmp(ROCKBOX_DIR, currdir) || (len-extlen > maxlen))
return; return;
strncpy(setting, filename, len-extlen); strncpy(setting, filename, len-extlen);