Scope-eye.net Git Repository
/
liskon_frotz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6abd0db
)
Avoid segfault for Alt-U undo when no more moves left.
author
David Griffith
<dave@661.org>
Wed, 9 Oct 2019 18:54:19 +0000
(11:54 -0700)
committer
David Griffith
<dave@661.org>
Wed, 9 Oct 2019 18:54:19 +0000
(11:54 -0700)
src/common/fastmem.c
patch
|
blob
|
history
diff --git
a/src/common/fastmem.c
b/src/common/fastmem.c
index 0bdb78f82b58575f860f0c549e09320013ff00ca..962792ff42912f92ed14c16fbe83b615a21a6f6a 100644
(file)
--- a/
src/common/fastmem.c
+++ b/
src/common/fastmem.c
@@
-896,7
+896,7
@@
static void mem_undiff(zbyte *diff, long diff_length, zbyte *dest)
*/
int restore_undo(void)
{
- long pc
= curr_undo->pc
;
+ long pc;
/* undo feature unavailable */
if (f_setup.undo_slots == 0)
@@
-906,6
+906,8
@@
int restore_undo(void)
if (curr_undo == NULL)
return 0;
+ pc = curr_undo->pc;
+
/* undo possible */
memmove(zmp, prev_zmp, z_header.dynamic_size);
SET_PC(pc);