ignore newline as first character fix #13
This commit is contained in:
parent
0b52a2f246
commit
b71f1afe11
@ -200,7 +200,6 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
|
|||||||
if( (NULL != inst)
|
if( (NULL != inst)
|
||||||
&& (SHELLMATTA_MAGIC == inst->magic))
|
&& (SHELLMATTA_MAGIC == inst->magic))
|
||||||
{
|
{
|
||||||
|
|
||||||
/** -# process byte wise */
|
/** -# process byte wise */
|
||||||
for (uint32_t i = 0u; i < size; i++)
|
for (uint32_t i = 0u; i < size; i++)
|
||||||
{
|
{
|
||||||
@ -209,6 +208,12 @@ shellmatta_retCode_t shellmatta_processData(shellmatta_handle_t handle,
|
|||||||
{
|
{
|
||||||
escape_handleSequence(inst, *data);
|
escape_handleSequence(inst, *data);
|
||||||
}
|
}
|
||||||
|
/** -# ignore newline as first character (to be compatible to
|
||||||
|
* terminals sending newline after return */
|
||||||
|
else if((0u == inst->inputCount) && ('\n' == *data))
|
||||||
|
{
|
||||||
|
/* do nothing */
|
||||||
|
}
|
||||||
/** -# handle return as start of processing the command */
|
/** -# handle return as start of processing the command */
|
||||||
else if ('\r' == *data)
|
else if ('\r' == *data)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user