projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
improve [f]stat[v]fs functions, and possibly work around old kernels
[musl]
/
src
/
multibyte
/
mbsrtowcs.c
diff --git
a/src/multibyte/mbsrtowcs.c
b/src/multibyte/mbsrtowcs.c
index
75a493c
..
b9bbc33
100644
(file)
--- a/
src/multibyte/mbsrtowcs.c
+++ b/
src/multibyte/mbsrtowcs.c
@@
-54,7
+54,10
@@
resume0:
wn--;
c = 0;
} else for (;;) {
- if (!wn) return wn0;
+ if (!wn) {
+ *src = (const void *)s;
+ return wn0;
+ }
if (*s-1u < 0x7f && (uintptr_t)s%4 == 0) {
while (wn>=4 && !(( *(uint32_t*)s | *(uint32_t*)s-0x01010101) & 0x80808080)) {
*ws++ = *s++;