mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-26 23:10:38 +00:00
More accurate error reporting for savestate loads
This commit is contained in:
parent
a1010e3b2e
commit
cf49ff04ca
@ -60,6 +60,8 @@ PointerWrapSection PointerWrap::Section(const char *title, int minVer, int ver)
|
||||
char marker[16] = {0};
|
||||
int foundVersion = ver;
|
||||
|
||||
curTitle_ = title;
|
||||
|
||||
// This is strncpy because we rely on its weird non-null-terminating zero-filling truncation behaviour.
|
||||
// Can't replace it with the more sensible truncate_cpy because that would break savestates.
|
||||
strncpy(marker, title, sizeof(marker));
|
||||
@ -122,6 +124,8 @@ void PointerWrap::SetError(Error error_) {
|
||||
// For the rest of this run, do nothing, to avoid running off the end of memory or something,
|
||||
// and also not logspam like MEASURE will do in an error case.
|
||||
mode = PointerWrap::MODE_NOOP;
|
||||
// Also, remember the bad section.
|
||||
firstBadSectionTitle_ = curTitle_;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,6 +160,7 @@ public:
|
||||
|
||||
private:
|
||||
const char *firstBadSectionTitle_ = nullptr;
|
||||
const char *curTitle_;
|
||||
u8 *ptrStart_;
|
||||
std::vector<SerializeCheckpoint> checkpoints_;
|
||||
size_t curCheckpoint_ = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user