mpcinfo: Do not modify string literals

This commit is contained in:
Igor 2016-10-12 11:20:30 +03:00 committed by TingPing
parent 116a394ef6
commit f64d1c847a
1 changed files with 1 additions and 4 deletions

View File

@ -48,7 +48,7 @@ struct tagInfo getOggHeader(char *file){
char *sub;
char *name;
char *val;
char *HEADLOC1, *HEADLOC3, *HEADLOC5;
char HEADLOC1[]="_vorbis", HEADLOC3[]="_vorbis", HEADLOC5[]="_vorbis";
FILE *f;
struct tagInfo info;
@ -62,11 +62,8 @@ struct tagInfo getOggHeader(char *file){
for (i=0;i<4095;i++) {c=fgetc(f);header[i]=(char)c;}
fclose(f);
HEADLOC1="_vorbis";
HEADLOC1[0]=1;
HEADLOC3="_vorbis";
HEADLOC3[0]=3;
HEADLOC5="_vorbis";
HEADLOC5[0]=5;
h1pos=inStr(header,4096,HEADLOC1);
h3pos=inStr(header,4096,HEADLOC3);