1
0
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:
Martin Guy 2011-04-23 18:03:51 +02:00
parent 35c0b09875
commit 3b17c33002

View File

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