fix in autosave

This commit is contained in:
p.kosyh 2010-08-31 08:03:36 +00:00
parent 0259f048a6
commit 537c0ff354
2 changed files with 7 additions and 3 deletions

1
debian/changelog vendored
View file

@ -2,6 +2,7 @@ instead (1.2.1) unstable; urgency=low
* clearlooks bg;
* fading fix;
* fix in disable autosave
-- Peter Kosyh <p.kosyh@gmail.com> Sat, 28 Aug 2010 19:47:00 +0300

View file

@ -416,9 +416,12 @@ int game_save(int nr)
char cmd[PATH_MAX];
char *p;
if (s) {
if (nr == -1) {
instead_eval("autosave(-1)"); /* enable saving for -1 */
instead_clear();
if (nr == -1 || nr == 0) {
if (nr == -1) {
instead_eval("autosave(-1)"); /* enable saving for -1 */
instead_clear();
} else if (!game_saves_enabled())
return 0; /* nothing todo */
}
snprintf(cmd, sizeof(cmd) - 1, "save %s", s);
p = instead_cmd(cmd);