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:
parent
529855e79b
commit
2c10af5d30
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue