`clues' array being able to be -1, so we must explicitly declare it
as `signed char' or it will break on platforms whose default char is
unsigned.
git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7636
cda61777-01e9-0310-a592-
d414129be87e
int w, h;
/* Put -1 in a square that doesn't get a clue */
int w, h;
/* Put -1 in a square that doesn't get a clue */
/* Arrays of line states, stored left-to-right, top-to-bottom */
char *hl, *vl;
/* Arrays of line states, stored left-to-right, top-to-bottom */
char *hl, *vl;
ret->solved = state->solved;
ret->cheated = state->cheated;
ret->solved = state->solved;
ret->cheated = state->cheated;
- ret->clues = snewn(SQUARE_COUNT(state), char);
+ ret->clues = snewn(SQUARE_COUNT(state), signed char);
memcpy(ret->clues, state->clues, SQUARE_COUNT(state));
ret->hl = snewn(HL_COUNT(state), char);
memcpy(ret->clues, state->clues, SQUARE_COUNT(state));
ret->hl = snewn(HL_COUNT(state), char);
* the dimensions provided by said game_state) */
static void add_full_clues(game_state *state, random_state *rs)
{
* the dimensions provided by said game_state) */
static void add_full_clues(game_state *state, random_state *rs)
{
char *board;
int i, j, a, b, c;
int board_area = SQUARE_COUNT(state);
char *board;
int i, j, a, b, c;
int board_area = SQUARE_COUNT(state);
state->h = params->h;
state->w = params->w;
state->h = params->h;
state->w = params->w;
- state->clues = snewn(SQUARE_COUNT(params), char);
+ state->clues = snewn(SQUARE_COUNT(params), signed char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
state->h = params->h;
state->w = params->w;
state->h = params->h;
state->w = params->w;
- state->clues = snewn(SQUARE_COUNT(params), char);
+ state->clues = snewn(SQUARE_COUNT(params), signed char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);
state->hl = snewn(HL_COUNT(params), char);
state->vl = snewn(VL_COUNT(params), char);