On 17/12/2011 15:19, Al Le wrote:
Is it a typo or an intended code (it occurs twice)?
cuesheet_offset += cuesheet_offset+1;
Shouldn't it be "cuesheet_offset += 1;"?
Or is the code correct because it is in the branch for UTF16, i.e. two
bytes per character?
I'm just asking for the case.
It's intended code.
For single byte encodings, we have (space is really \0 for the cuesheet
string in these examples);
[enc type] [CUESHEET ]
1 +9 =10
For double byte encodings;
[enc type] [bom] [ C U E S H E E T ]
1 +2 +18 = 21
So;
10 += 10+1
Maybe I just should have written "cuesheet_offset = 21;", it's not going
to change. Force of habit I suppose.
Cheers,
Nick