From 02e584c06c507a7802ed160ff954fa9fd080265c Mon Sep 17 00:00:00 2001 From: aiju Date: Wed, 2 May 2018 23:01:39 +0000 Subject: [PATCH] games/mines: chain new CLists in splitknown correctly --- sys/src/games/mines/ghost.c | 4 ++-- 1 file 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;