From 2c10af5d3015be95020a8619c7ee657994f14558 Mon Sep 17 00:00:00 2001 From: Alexander Levin Date: Mon, 29 Jun 2009 14:25:42 +0000 Subject: [PATCH] =?UTF-8?q?Do=20not=20modify=20the=20passed=20in=20paramet?= =?UTF-8?q?er=20string=20(FS#10392=20by=20Jonas=20H=C3=A4ggqvist)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21551 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/settings.c b/apps/settings.c index 3219dbbf12..1d5af5678e 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -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);