summaryrefslogtreecommitdiff
path: root/lib/bio/bio.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bio/bio.myr')
-rw-r--r--lib/bio/bio.myr6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index f5ce61b..eb55069 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -422,7 +422,11 @@ const readdelim = {f, delim, drop
* delimiter at the end. If we're at 0 bytes even
* then, return an eof.
*/
- readinto(f, &ret, f.rend - f.rstart)
+ if drop
+ f.rstart += f.rend - f.rstart
+ else
+ readinto(f, &ret, f.rend - f.rstart)
+ ;;
match ret.len
| 0: -> `std.Err `Eof
| _: -> `std.Ok ret