added byte count limiter for read on MString.
This commit is contained in:
parent
5e6d162a05
commit
3f0a541e80
@ -279,6 +279,13 @@ namespace coreutils {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MString &MString::read(int fd, int count) {
|
||||
char ch;
|
||||
while(count-- && ::read(fd, &ch, 1))
|
||||
write(ch);
|
||||
return *this;
|
||||
}
|
||||
|
||||
int MString::offset() {
|
||||
return cursor - data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user