mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
When there is an error reading a line of input, return the actual number of
characters received before the error (not a whole buffer full of junk!)
This commit is contained in:
parent
35c0b09875
commit
3b17c33002
@ -80,7 +80,7 @@ static _ssize_t std_read( struct _reent *r, int fd, void* vptr, size_t len )
|
||||
}
|
||||
ptr[ i ++ ] = c;
|
||||
}
|
||||
return len;
|
||||
return i;
|
||||
}
|
||||
|
||||
// 'write'
|
||||
|
Loading…
x
Reference in New Issue
Block a user