diff options
Diffstat (limited to 'libc/bios/bios_vid.c')
-rw-r--r-- | libc/bios/bios_vid.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/bios/bios_vid.c b/libc/bios/bios_vid.c index db2e91d..ec3c603 100644 --- a/libc/bios/bios_vid.c +++ b/libc/bios/bios_vid.c @@ -410,6 +410,13 @@ int len; int ch; int pos=0; + if( len < 0 ) { errno = EINVAL; return -1; } + if( len == 0 ) + { + if( bios_khit() == 0 ) return 0; + errno = EINTR; + return -1; + } if( len == 1 ) { buf[0]=((ch=bios_getc())&0xFF?ch&0xFF:((ch>>8)&0xFF|0x80)); |