diff options
author | Damien Zammit <damien@zamaudio.com> | 2017-10-15 13:10:47 +1100 |
---|---|---|
committer | Damien Zammit <damien@zamaudio.com> | 2017-10-15 13:10:47 +1100 |
commit | 94739ddb379c8b542cfe1c144828cc664f65f621 (patch) | |
tree | fd32b3f04547daca385e123bef21b58279e14140 | |
parent | 6c550d7b2ecb85f0aaccbe68a3b4a66bcd724946 (diff) |
Find start of wav list more consistently in ptxfix_xor
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r-- | ptfformat.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ptfformat.cc b/ptfformat.cc index 1350c5d..4954546 100644 --- a/ptfformat.cc +++ b/ptfformat.cc @@ -798,13 +798,14 @@ void PTFFormat::parseaudio10(void) { uint64_t i,j,k,l; uint8_t charlen; + char *s = NULL; - if (!strstr((char*)ptfunxored, "Audio Files")) { + if (!(s = strstr((char*)ptfunxored, "Audio Files"))) { return; } // Find end of wav file list - k = 0; + k = (uint64_t)( (unsigned char *)s - ptfunxored); while (k < len) { if ( (ptfunxored[k ] == 0xff) && (ptfunxored[k+1] == 0xff) && |