mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 00:20:34 +00:00
Fix bug where wcscspn could return non-zero value on an empty string.
svn path=/trunk/; revision=39945
This commit is contained in:
parent
db0b0ba158
commit
acdae19a65
1 changed files with 2 additions and 2 deletions
|
@ -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 */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue