diff options
author | Damien Zammit <damien@zamaudio.com> | 2015-08-07 05:07:54 +1000 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2015-08-07 05:07:54 +1000 |
commit | 02ba10aee106084db8dd612073fd61fae154d092 (patch) | |
tree | 77161ba6c0b0ee4eb3f1f8b67b47df34e3788e48 | |
parent | b410d0953a68a086d9c52eda7cff9ce84c9949dc (diff) |
Fixed ptx parsing (?)
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r-- | ptfformat.cc | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/ptfformat.cc b/ptfformat.cc index 28ecf5d..f8800ab 100644 --- a/ptfformat.cc +++ b/ptfformat.cc @@ -891,34 +891,24 @@ PTFFormat::parserest10(void) { //printf("%s\n", name); } } - - while (k < len) { - if ( (ptfunxored[k ] == 0x5a) && - (ptfunxored[k+1] == 0x03)) { - break; - } - k++; - } - while (k < len) { - if ( (ptfunxored[k ] == 0x5a) && - (ptfunxored[k+1] == 0x02)) { - break; - } - k++; - } - k++; - // Tracks uint32_t offset; uint32_t tracknumber = 0; uint32_t regionspertrack = 0; for (;k < len; k++) { if ( (ptfunxored[k ] == 0x5a) && + (ptfunxored[k+1] == 0x08)) { + break; + } + } + k++; + for (;k < len; k++) { + if ( (ptfunxored[k ] == 0x5a) && (ptfunxored[k+1] == 0x04)) { break; } if ( (ptfunxored[k ] == 0x5a) && - (ptfunxored[k+1] == 0x03)) { + (ptfunxored[k+1] == 0x02)) { uint8_t lengthofname = 0; lengthofname = ptfunxored[k+9]; |