silence warnings from gcc 8
Haldean Brown
3 years ago
284 | 284 | input_len = trim_commentary(input); |
285 | 285 | notation = calloc(input_len + 1, sizeof(char)); |
286 | 286 | notation_head = notation; |
287 | strncpy(notation, input, input_len); | |
287 | memcpy(notation, input, input_len); | |
288 | 288 | notation[input_len] = '\0'; |
289 | 289 | |
290 | 290 | /* create result and fill in known fields */ |
292 | 292 | result->post_board = NULL; |
293 | 293 | result->player = opposite(last_move->player); |
294 | 294 | 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'; | |
296 | 297 | result->parent = last_move; |
297 | 298 | |
298 | 299 | if (input_len < 2) |