mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2026-01-01 01:41:18 +01:00
This makes the code of `readline()` clearer and shorter. It also fixes a minor artifact of the long line handling. Previously it was not possible to recover from a long line. That is, if too many characters were sent, the line would be invalidated and pressing backspace would not fix it- the only option was to discard the line. It is now possible to bring the line back to size. Note that visual effects when deleting characters will still depend on the host's terminal. The new code is written in a way that all writes to memory are guarded by bounds check, so an assertion was removed. Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>