1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-30 02:12:30 +01:00

fixed a test condition

This commit is contained in:
dan
2003-08-14 01:43:07 +00:00
parent 08225948bc
commit 090cc27f00

View File

@@ -57,9 +57,9 @@ wmbsnrtowcs(wchar_t *dest, const char **src, size_t nbytes, size_t len)
if (dest == NULL) {
for (;;) {
nb = mbrtowc(NULL, ptr, nbytes, &ps);
if (nb < 0) {
if (nb == -1) {
return ((size_t)-1);
} else if (nb==0 || nb>nbytes) {
} else if (nb==0 || nb==-2) {
return n;
}
ptr += nb;