decoder.c
branchtrunk
changeset 34 afc13760179b
parent 33 65ed49cbc08b
     1.1 --- a/decoder.c	Fri Nov 13 19:27:36 2009 +0800
     1.2 +++ b/decoder.c	Sun Dec 06 08:48:57 2009 +0800
     1.3 @@ -137,7 +137,7 @@
     1.4  {
     1.5    // if no title, try to build a reasonable from the filename
     1.6    if(!Title && filename)  {
     1.7 -    char *s=rindex(filename,'/');
     1.8 +    const char *s=rindex(filename,'/');
     1.9      if(s && *s=='/') {
    1.10        s++;
    1.11        Title=strdup(s);
    1.12 @@ -147,8 +147,8 @@
    1.13          if(l>0 && !strcasecmp(Title+l,extention)) Title[l]=0;
    1.14          }
    1.15        else {                                     // strip any extention
    1.16 -        s=rindex(Title,'.');
    1.17 -        if(s && *s=='.' && strlen(s)<=5) *s=0;
    1.18 +        char *e=rindex(Title,'.');
    1.19 +        if(e && *e=='.' && strlen(e)<=5) *e=0;
    1.20          }
    1.21        d(printf("mp3: faking title '%s' from filename '%s'\n",Title,filename))
    1.22        }