pvrparse.cpp patch details.

pvrparse.cpp patch details.

getStructureEntryFirst() keeps a cache of data from the ts.sc file and uses a binary search to find the entry at or preceding an offset. However, the lower-range setting has an off-by-one error, and you'll never match the first entry.
I just happened to hit this (once). It seems to be a rare occurrence.
The effect is that it returns an entry after the given offset, which confuses the rest of the code logic (and resulted in an "impossible" loop in some fixed code I was testing).

I wrote a simple test program to call the function with the ts.sc data at the point in question, and the FAIL one shows the offset going forwards.


 [parent]: grep changes FAIL.list
 Offset changes from 103550600 to 103550606
 Offset changes from 103550605 to 103550606
 Offset changes from 103550606 to 103550606
 Offset changes from 103550607 to 103550606
 Offset changes from 103550608 to 103550606
 [parent]: grep changes OK.list
 Offset changes from 103550600 to 103521283
 Offset changes from 103550605 to 103521283
 Offset changes from 103550606 to 103550606
 Offset changes from 103550607 to 103550606
 Offset changes from 103550608 to 103550606