Fixed issue with empty ?~ filling in blanks
This commit is contained in:
parent
c644597eac
commit
fb394db72d
|
@ -84,11 +84,13 @@ device_write(char *s)
|
|||
static void
|
||||
device_read(void)
|
||||
{
|
||||
char c;
|
||||
char c, *origin = dst_;
|
||||
while(fread(&c, 1, 1, stdin) && c >= ' ')
|
||||
*dst_++ = c;
|
||||
if(feof(stdin))
|
||||
*dst_++ = 'E', *dst_++ = 'O', *dst_++ = 'F';
|
||||
if(dst_ - origin == 0)
|
||||
dst_--;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue