Fixed issue with empty ?~ filling in blanks

This commit is contained in:
Devine Lu Linvega 2024-04-28 20:58:47 -07:00
parent c644597eac
commit fb394db72d
1 changed files with 3 additions and 1 deletions

View File

@ -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