From a7e8c203385f34c7c5e81614c38d5e0f14e23594 Mon Sep 17 00:00:00 2001 From: girst Date: Thu, 29 Mar 2018 06:38:25 +0200 Subject: [PATCH] fix missing modechar after flagging --- mines_2017.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mines_2017.c b/mines_2017.c index 706b46a..56027d5 100644 --- a/mines_2017.c +++ b/mines_2017.c @@ -538,6 +538,8 @@ int uncover_square (int l, int c) { } void flag_square (int l, int c) { + static char modechar[] = {'*', '!', '?'}; + if (f.c[l][c].o != CLOSED) return; /* cycles through flag/quesm/noflag (uses op.mode to detect which ones are allowed) */ @@ -546,7 +548,7 @@ void flag_square (int l, int c) { else f.f--; //WARN: breaks on `-q'! partial_show_minefield (l, c, NORMAL); move (1, op.scheme->cell_width); - printf ("[%03d]", f.m - f.f); + printf ("[%03d%c]", f.m - f.f, modechar[f.s]); } void quesm_square (int l, int c) { -- 2.39.3