Skip to content

Commit

Permalink
Merge pull request #45 from dubit0/fix-id3-parsing-unicode
Browse files Browse the repository at this point in the history
ID3 Parsing: Only convert unicode if framesize > 1
  • Loading branch information
schreibfaul1 authored Jun 14, 2020
2 parents 4a3f8fd + d711469 commit d4d5153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ void Audio::readID3Metadata(){
setFilePos(getFilePos()+framesize-1-255); id3Size-=framesize-1;
}
}
if(isUnicode){ // convert unicode to utf-8 U+0020...U+07FF
if(isUnicode && framesize > 1){ // convert unicode to utf-8 U+0020...U+07FF
j=0; m=0;
while(m<i-1){
if((value[m]==0xFE)&&(value[m+1]==0xFF)){bitorder=true; j=m+2;}// MSB/LSB
Expand Down

0 comments on commit d4d5153

Please sign in to comment.