mirror of https://github.com/stella-emu/stella.git
Fix potential data loss in state save file.
This commit is contained in:
parent
b74c66a82e
commit
d64ff2e5b7
|
@ -69,7 +69,7 @@ BusTransactionQueue& BusTransactionQueue::reset()
|
||||||
bool BusTransactionQueue::save(Serializer& out) const
|
bool BusTransactionQueue::save(Serializer& out) const
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
out.putInt(myQueueSize);
|
out.putLong(myQueueSize);
|
||||||
out.putShort(myNextInjectAddress);
|
out.putShort(myNextInjectAddress);
|
||||||
out.putLong(myTimestamp);
|
out.putLong(myTimestamp);
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ bool BusTransactionQueue::load(Serializer& in)
|
||||||
try {
|
try {
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
myQueueSize = in.getInt();
|
myQueueSize = in.getLong();
|
||||||
myNextInjectAddress = in.getShort();
|
myNextInjectAddress = in.getShort();
|
||||||
myTimestamp = in.getLong();
|
myTimestamp = in.getLong();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue