~mdw
/
sgt
/
puzzles
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change of policy on game_changed_state(). Originally, it was called
[sgt/puzzles]
/
midend.c
diff --git
a/midend.c
b/midend.c
index
7ef05cb
..
b5ce237
100644
(file)
--- a/
midend.c
+++ b/
midend.c
@@
-491,6
+491,10
@@
static int midend_really_process_key(midend_data *me, int x, int y, int button)
me->states[me->nstates].movetype = MOVE;
me->statepos = ++me->nstates;
me->dir = +1;
me->states[me->nstates].movetype = MOVE;
me->statepos = ++me->nstates;
me->dir = +1;
+ if (me->ui)
+ me->ourgame->changed_state(me->ui,
+ me->states[me->statepos-2].state,
+ me->states[me->statepos-1].state);
} else {
goto done;
}
} else {
goto done;
}
@@
-1350,6
+1354,7
@@
char *midend_deserialise(midend_data *me,
if (key[8] != ':') {
if (started)
ret = "Data was incorrectly formatted for a saved game file";
if (key[8] != ':') {
if (started)
ret = "Data was incorrectly formatted for a saved game file";
+ goto cleanup;
}
len = strcspn(key, ": ");
assert(len <= 8);
}
len = strcspn(key, ": ");
assert(len <= 8);