aboutsummaryrefslogtreecommitdiffstats
path: root/src/wchar/wcsstr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/wchar/wcsstr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wchar/wcsstr.c b/src/wchar/wcsstr.c
index 36ae893..b0600e1 100644
--- a/src/wchar/wcsstr.c
+++ b/src/wchar/wcsstr.c
@@ -33,6 +33,8 @@
*/
wchar_t* (wcswcs)(const wchar_t* haystack, const wchar_t* needle)
{
+ if (*needle && !(needle[1]))
+ return (wcschr)(haystack, *needle);
return (wcsstr)(haystack, needle);
}