Return number of bytes read even on a partial read
and set the rune to Runeerror for later checking (if desired).
This commit is contained in:
parent
f2e6af7350
commit
696bb992c3
|
@ -34,7 +34,8 @@ readrune(const char *file, FILE *fp, Rune *r)
|
|||
file, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
*r = Runeerror;
|
||||
return i;
|
||||
}
|
||||
buf[i++] = c;
|
||||
if (fullrune(buf, i)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user