console fix warning build.

This commit is contained in:
David CARLIER 2023-03-17 17:17:32 +00:00
parent 6faa03a59d
commit 038848b246

View file

@ -457,7 +457,7 @@ Key_Console(int key)
history_line = (edit_line + 1) & (NUM_KEY_LINES-1); history_line = (edit_line + 1) & (NUM_KEY_LINES-1);
} }
strcpy(key_lines[edit_line], key_lines[history_line]); memmove(key_lines[edit_line], key_lines[history_line], sizeof(key_lines[edit_line]));
key_linepos = (int)strlen(key_lines[edit_line]); key_linepos = (int)strlen(key_lines[edit_line]);
return; return;
} }
@ -484,7 +484,7 @@ Key_Console(int key)
} }
else else
{ {
strcpy(key_lines[edit_line], key_lines[history_line]); memmove(key_lines[edit_line], key_lines[history_line], sizeof(key_lines[edit_line]));
key_linepos = (int)strlen(key_lines[edit_line]); key_linepos = (int)strlen(key_lines[edit_line]);
} }