mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-03 14:25:03 +02:00
fix: bug (it overlaps backwards, moving items >:(, why buggy copy sometimes?)
This commit is contained in:
parent
468ebf769e
commit
483445007b
@ -32,7 +32,7 @@ void field_update(struct editable_field *field, char *update) {
|
|||||||
if (*update == 127) {
|
if (*update == 127) {
|
||||||
if (field->pos == 0) return;
|
if (field->pos == 0) return;
|
||||||
if (field->pos < field->length) {
|
if (field->pos < field->length) {
|
||||||
memcpy(&field->content[field->pos - 1], &field->content[field->pos],
|
memmove(&field->content[field->pos - 1], &field->content[field->pos],
|
||||||
field->length - field->pos);
|
field->length - field->pos);
|
||||||
}
|
}
|
||||||
(field->pos)--;
|
(field->pos)--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user