Fix gcc string truncation warnings

This commit is contained in:
Dominique Martinet 2018-04-13 22:35:23 +09:00
parent 54ae394754
commit 25af959fe9
4 changed files with 4 additions and 4 deletions

View file

@ -601,7 +601,7 @@ struct cmd_results *add_color(const char *name,
"Invalid color definition %s", color);
}
}
strncpy(buffer, color, len);
strcpy(buffer, color);
// add default alpha channel if color was defined without it
if (len == 7) {
buffer[7] = 'f';