all repos — mgba @ 9cc97410d3804f85390d08313c92d089dec6d3b0

mGBA Game Boy Advance Emulator

Make sure not to reload an old rr stream chunk when reaching the end of a file
Jeffrey Pfau jeffrey@endrift.com
Tue, 29 Jul 2014 23:39:55 -0700
commit

9cc97410d3804f85390d08313c92d089dec6d3b0

parent

e3410fc457b57b6d3145ca5a4ab190adcd517c57

1 files changed, 1 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-rr.csrc/gba/gba-rr.c

@@ -263,6 +263,7 @@ bool _seekTag(struct GBARRContext* rr, struct VFile* vf, enum GBARRTag tag) {

enum GBARRTag readTag; while ((readTag = _readTag(rr, vf)) != tag) { if (readTag == TAG_END) { + rr->nextTime = 0; while (_readTag(rr, vf) != TAG_EOF); if (!rr->nextTime || !GBARRLoadStream(rr, rr->nextTime)) { return false;