chiark / gitweb /
build fix
authorSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 16:39:22 +0000 (17:39 +0100)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 16:39:22 +0000 (17:39 +0100)
pearl.c

diff --git a/pearl.c b/pearl.c
index 977577f55bb1d78bf9b05ad9e33b36fc1b77498b..20ba3d44a6bbfaec99aa132bc938147e5eb0bb38 100644 (file)
--- a/pearl.c
+++ b/pearl.c
@@ -1737,7 +1737,7 @@ static char *game_text_format(const game_state *state)
     for (r = 0; r < h; ++r) {
        for (c = 0; c < w; ++c) {
            int i = r*w + c, cell = r*ch*gw + c*cw;
-           board[cell] = state->shared->clues[i]["+BW"];
+           board[cell] = "+BW"[(unsigned char)state->shared->clues[i]];
            if (c < w - 1 && (state->lines[i] & R || state->lines[i+1] & L))
                memset(board + cell + 1, '-', cw - 1);
            if (r < h - 1 && (state->lines[i] & D || state->lines[i+w] & U))