summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2018-05-02 23:01:39 +0000
committeraiju <devnull@localhost>2018-05-02 23:01:39 +0000
commit02e584c06c507a7802ed160ff954fa9fd080265c (patch)
tree10fc2ed0c71e816d455d671ce0002439c1579649 /sys/src/games
parent28c519295f3cf6768f46f715c9a38e1739b8e966 (diff)
games/mines: chain new CLists in splitknown correctly
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/mines/ghost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/games/mines/ghost.c b/sys/src/games/mines/ghost.c
index 0c24d2ba0..2dc36af4f 100644
--- a/sys/src/games/mines/ghost.c
+++ b/sys/src/games/mines/ghost.c
@@ -182,8 +182,8 @@ splitknown(CList **clp, int *nclp, int i, int *lastq)
cl[ncl - 1 + j].mines = cl[i].pts == cl[i].mines;
cl[ncl - 1 + j].pts = 1;
cl[ncl - 1 + j].pt[0] = cl[i].pt[j];
- cl[*lastq].next = i;
- *lastq = i;
+ cl[*lastq].next = ncl - 1 + j;
+ *lastq = ncl - 1 + j;
}
cl[i].mines = cl[i].pts == cl[i].mines;
*nclp += cl[i].pts - 1;