ext/kgio/read_write.c in kgio-1.2.1 vs ext/kgio/read_write.c in kgio-1.3.0
- old
+ new
@@ -231,10 +231,10 @@
if (a->len <= 0)
goto done;
a->ptr = RSTRING_PTR(a->buf) + written;
return -1;
} else if (written > 0) {
- a->buf = rb_str_new(a->ptr + n, a->len - n);
+ a->buf = rb_str_new(a->ptr, a->len);
} else {
a->buf = mKgio_WaitWritable;
}
return 0;
}