From cf32b4395d702db2c23b7c4c8d5d69c19a0cc425 Mon Sep 17 00:00:00 2001 From: Orz-zrO <1627711948@qq.com> Date: Sun, 8 Mar 2020 23:58:32 +0800 Subject: [PATCH] Add files via upload --- libs/control.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libs/control.js b/libs/control.js index 333d5083..e9221a9e 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1673,8 +1673,6 @@ control.prototype._doSL_save = function (id) { control.prototype._doSL_load = function (id, callback) { if (id == 'autoSave' && core.saves.autosave.data != null) { - if(core.saves.autosave.now>0) - { core.saves.autosave.now=core.saves.autosave.now-1; var data = core.saves.autosave.data.splice(core.saves.autosave.now,1)[0]; if(core.status.played && !core.status.gameOver) @@ -1684,11 +1682,10 @@ control.prototype._doSL_load = function (id, callback) { } if(core.saves.autosave.now==0) { - core.saves.autosave.data.unshift(data); + core.saves.autosave.data.unshift(core.clone(data)); core.saves.autosave.now=core.saves.autosave.now+1; } callback(id, data); - } } else { core.getLocalForage(id=='autoSave'?id:"save"+id, null, function(data) {