diff --git a/reactos/lib/sdk/crt/wstring/wcscspn.c b/reactos/lib/sdk/crt/wstring/wcscspn.c index 1fcad259b43..a68dd776385 100644 --- a/reactos/lib/sdk/crt/wstring/wcscspn.c +++ b/reactos/lib/sdk/crt/wstring/wcscspn.c @@ -18,7 +18,7 @@ size_t wcscspn(const wchar_t *str,const wchar_t *reject) wchar_t *s; wchar_t *t; s=(wchar_t *)str; - do { + while (*s) { t=(wchar_t *)reject; while (*t) { if (*t==*s) @@ -28,6 +28,6 @@ size_t wcscspn(const wchar_t *str,const wchar_t *reject) if (*t) break; s++; - } while (*s); + } return s-str; /* nr of wchars */ }