diff options
author | px4dev <px4@purgatory.org> | 2012-12-30 15:08:25 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-12-30 15:08:25 -0800 |
commit | f2d4eb2887829efebef853c16223151e0a37f5bb (patch) | |
tree | 0b531ea524705d3c9e12683cffaf13e92b1df63f /apps/px4io/mixer.cpp | |
parent | 668d1b330114fefc0ae7a6c476074f2c263c1476 (diff) | |
download | px4-firmware-f2d4eb2887829efebef853c16223151e0a37f5bb.tar.gz px4-firmware-f2d4eb2887829efebef853c16223151e0a37f5bb.tar.bz2 px4-firmware-f2d4eb2887829efebef853c16223151e0a37f5bb.zip |
Revert "Removed text reuse, causing crash with stack trace"
This reverts commit 668d1b330114fefc0ae7a6c476074f2c263c1476.
Diffstat (limited to 'apps/px4io/mixer.cpp')
-rw-r--r-- | apps/px4io/mixer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/px4io/mixer.cpp b/apps/px4io/mixer.cpp index 6b37d83ab..d21b3a898 100644 --- a/apps/px4io/mixer.cpp +++ b/apps/px4io/mixer.cpp @@ -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; |