correct return bug
This commit is contained in:
parent
4f48257422
commit
8e61012638
20
liblog.c
20
liblog.c
|
@ -94,24 +94,26 @@ static void append_character(char c)
|
|||
|
||||
if (c=='\n')
|
||||
{
|
||||
current_line->text[current_line->cursor]= '\0';
|
||||
current_line->text[current_line->cursor] = '\0';
|
||||
add_line();
|
||||
return;
|
||||
}
|
||||
else
|
||||
current_line->text[current_line->cursor] = c;
|
||||
if (c!='\0')
|
||||
{
|
||||
current_line->text[current_line->cursor] = c;
|
||||
current_line->cursor ++;
|
||||
}
|
||||
|
||||
|
||||
if (current_line->cursor == MAX_LENGHT-1)
|
||||
add_line();
|
||||
current_line->text[current_line->cursor] = '\0';
|
||||
//current_line->text[current_line->cursor] = '\0';
|
||||
#ifdef FXCG50
|
||||
if (dsize(¤t_line->text[0])>396-7)
|
||||
else if (dsize(¤t_line->text[0])>396-7)
|
||||
{
|
||||
add_line();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// log something
|
||||
|
@ -121,7 +123,7 @@ void ll_send(const char * txt)
|
|||
{
|
||||
char c=1;
|
||||
int i=0;
|
||||
while (c)
|
||||
while (c!='\0')
|
||||
{
|
||||
c=txt[i];
|
||||
append_character(c);
|
||||
|
@ -175,7 +177,7 @@ void ll_pause()
|
|||
line=linet;
|
||||
}
|
||||
if (key==KEY_EXIT)
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue