Do not modify the passed in parameter string (FS#10392 by Jonas Häggqvist)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21551 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alexander Levin 2009-06-29 14:25:42 +00:00
parent 529855e79b
commit 2c10af5d30
1 changed files with 2 additions and 3 deletions

View File

@ -1146,15 +1146,14 @@ bool set_option(const char* string, const void* variable, enum optiontype type,
void set_file(const char* filename, char* setting, int maxlen)
{
char* fptr = strrchr(filename,'/');
const char* fptr = strrchr(filename,'/');
int len;
int extlen = 0;
char* ptr;
const char* ptr;
if (!fptr)
return;
*fptr = 0;
fptr++;
len = strlen(fptr);