mirror of https://github.com/mgba-emu/mgba.git
Make sure not to reload an old rr stream chunk when reaching the end of a file
This commit is contained in:
parent
e3410fc457
commit
9cc97410d3
|
@ -263,6 +263,7 @@ bool _seekTag(struct GBARRContext* rr, struct VFile* vf, enum GBARRTag tag) {
|
||||||
enum GBARRTag readTag;
|
enum GBARRTag readTag;
|
||||||
while ((readTag = _readTag(rr, vf)) != tag) {
|
while ((readTag = _readTag(rr, vf)) != tag) {
|
||||||
if (readTag == TAG_END) {
|
if (readTag == TAG_END) {
|
||||||
|
rr->nextTime = 0;
|
||||||
while (_readTag(rr, vf) != TAG_EOF);
|
while (_readTag(rr, vf) != TAG_EOF);
|
||||||
if (!rr->nextTime || !GBARRLoadStream(rr, rr->nextTime)) {
|
if (!rr->nextTime || !GBARRLoadStream(rr, rr->nextTime)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue