fix fgetwc when decoding a character that crosses buffer boundary Update the buffer position according to the bytes consumed into st when decoding an incomplete character at the end of the buffer.
diff --git a/src/stdio/fgetwc.c b/src/stdio/fgetwc.c index e455cfe..a00c1a8 100644 --- a/src/stdio/fgetwc.c +++ b/src/stdio/fgetwc.c
@@ -22,6 +22,7 @@ f->rpos++; return WEOF; } + f->rpos = f->rend; } else l = -2; /* Convert character byte-by-byte */