mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Revert "Removed text reuse, causing crash with stack trace"
This reverts commit 668d1b330114fefc0ae7a6c476074f2c263c1476.
This commit is contained in:
parent
668d1b3301
commit
f2d4eb2887
@ -220,11 +220,11 @@ mixer_handle_text(const void *buffer, size_t length)
|
||||
if (resid != mixer_text_length) {
|
||||
debug("used %u", mixer_text_length - resid);
|
||||
|
||||
// copy any leftover text to the base of the buffer for re-use
|
||||
// if (resid > 0)
|
||||
// memcpy(&mixer_text[0], &mixer_text[mixer_text_length - resid], resid);
|
||||
/* copy any leftover text to the base of the buffer for re-use */
|
||||
if (resid > 0)
|
||||
memcpy(&mixer_text[0], &mixer_text[mixer_text_length - resid], resid);
|
||||
|
||||
// mixer_text_length = resid;
|
||||
mixer_text_length = resid;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user