Commit 6559bd03 authored by deuce's avatar deuce
Browse files

*always* output a \n after input for cgets().

parent 2f17227f
......@@ -456,14 +456,15 @@ CIOLIBEXPORT char * CIOLIBCALL ciolib_cgets(char *str)
if(len==maxlen) {
str[len+2]=0;
*((unsigned char *)(str+1))=(unsigned char)len;
ciolib_putch('\n');
return(&str[2]);
}
break;
}
}
ciolib_putch(ch);
str[len+2]=0;
*((unsigned char *)(str+1))=(unsigned char)len;
ciolib_putch('\n');
return(&str[2]);
}
......@@ -906,6 +907,8 @@ CIOLIBEXPORT int CIOLIBCALL ciolib_putch(int a)
unsigned char a1=a;
CIOLIB_INIT();
if(a1=='\n')
return(cio_api.putch(a1));
return(cio_api.putch(a1));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment