-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
In ConsoleProcess, if the buffer is completely full, the call to ConsoleIoReceive will return 0 and no command parsing/processing will be done, and the buffer will remain full.
Line 139 in 22fe5a3
| if ( received > 0u ) |
This can happen if you enter a single line longer than the buffer size (256).
The fix could take several routes with different implications.
The special "buffer full without an ENDLINE" condition could be detected and take of these actions:
- Remove the oldest character e.g. with
ConsoleResetBuffer(mReceiveBuffer, mReceivedSoFar, 1) - Clear the whole buffer e.g. with
ConsoleResetBuffer(mReceiveBuffer, mReceivedSoFar, mReceivedSoFar) - Assume that characters on this line received now and in the future are in a state that is not recoverable, and enter a line purge mode. Emit an error message, then the buffer would be cleared continuously without command processing until an ENDLINE appeared and started a new line, and line purge mode would end and normal processing would continue.
Metadata
Metadata
Assignees
Labels
No labels