diff options
Diffstat (limited to 'main/plc.c')
-rw-r--r-- | main/plc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/plc.c b/main/plc.c index b649357dc..739f7276d 100644 --- a/main/plc.c +++ b/main/plc.c @@ -96,7 +96,7 @@ static void normalise_history(plc_state_t *s) if (s->buf_ptr == 0) return; memcpy(tmp, s->history, sizeof(int16_t)*s->buf_ptr); - memcpy(s->history, s->history + s->buf_ptr, sizeof(int16_t) * (PLC_HISTORY_LEN - s->buf_ptr)); + memmove(s->history, s->history + s->buf_ptr, sizeof(int16_t) * (PLC_HISTORY_LEN - s->buf_ptr)); memcpy(s->history + PLC_HISTORY_LEN - s->buf_ptr, tmp, sizeof(int16_t) * s->buf_ptr); s->buf_ptr = 0; } |