mirror of https://github.com/mgba-emu/mgba.git
Core: Fix stack bound error
This commit is contained in:
parent
7020e45841
commit
880a86df30
|
@ -327,9 +327,10 @@ bool mCoreSaveStateNamed(struct mCore* core, struct VFile* vf, int flags) {
|
||||||
|
|
||||||
struct mStateExtdataItem item = {
|
struct mStateExtdataItem item = {
|
||||||
.size = sizeof(creationUsec),
|
.size = sizeof(creationUsec),
|
||||||
.data = &creationUsec,
|
.data = malloc(sizeof(creationUsec)),
|
||||||
.clean = NULL
|
.clean = free
|
||||||
};
|
};
|
||||||
|
*(uint64_t*) item.data = creationUsec;
|
||||||
mStateExtdataPut(&extdata, EXTDATA_META_TIME, &item);
|
mStateExtdataPut(&extdata, EXTDATA_META_TIME, &item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue