diff options
Diffstat (limited to '')
-rw-r--r-- | src/wchar/wcschr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wchar/wcschr.c b/src/wchar/wcschr.c index 16ecac2..9b87167 100644 --- a/src/wchar/wcschr.c +++ b/src/wchar/wcschr.c @@ -151,6 +151,6 @@ wchar_t* wcsrchr(const wchar_t* string, wchar_t c) if (*string == c) r = string; else if (!*string++) - return r; + return c ? r : (string - 1); } |