git.haldean.org grandmaster / master
silence warnings from gcc 8 Haldean Brown 2 months ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
284284 input_len = trim_commentary(input);
285285 notation = calloc(input_len + 1, sizeof(char));
286286 notation_head = notation;
287 strncpy(notation, input, input_len);
287 memcpy(notation, input, input_len);
288288 notation[input_len] = '\0';
289289
290290 /* create result and fill in known fields */
292292 result->post_board = NULL;
293293 result->player = opposite(last_move->player);
294294 result->algebraic = calloc(input_len + 1, sizeof(char));
295 strncpy(result->algebraic, notation, input_len);
295 memcpy(result->algebraic, notation, input_len);
296 result->algebraic[input_len] = '\0';
296297 result->parent = last_move;
297298
298299 if (input_len < 2)