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:
4769522
)
Fix SEGV on undo past beginning of game.
author
Timo Korvola
<tkorvola@iki.fi>
Sun, 21 Jan 2018 18:53:26 +0000
(20:53 +0200)
committer
Timo Korvola
<tkorvola@iki.fi>
Sun, 21 Jan 2018 18:53:26 +0000
(20:53 +0200)
src/common/fastmem.c
patch
|
blob
|
history
diff --git
a/src/common/fastmem.c
b/src/common/fastmem.c
index 113370e15817429bbdaff889823f74a1bf7dd5b0..8ad1ee84db2de0cd02e3ce04d7bc265980c95b48 100644
(file)
--- a/
src/common/fastmem.c
+++ b/
src/common/fastmem.c
@@
-867,8
+867,6
@@
static void mem_undiff (zbyte *diff, long diff_length, zbyte *dest)
*/
int restore_undo (void)
{
- long pc = curr_undo->pc;
-
if (f_setup.undo_slots == 0) /* undo feature unavailable */
return -1;
@@
-880,7
+878,7
@@
int restore_undo (void)
/* undo possible */
memcpy (zmp, prev_zmp, h_dynamic_size);
- SET_PC (pc);
+ SET_PC (
curr_undo->
pc);
sp = stack + STACK_SIZE - curr_undo->stack_size;
fp = stack + curr_undo->frame_offset;
frame_count = curr_undo->frame_count;