mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
FS#13876 strcasestr doesn't finds utf8 characters
fisxes regression from afb0e84
Change-Id: I44e2cd481300ed73aec82aaa65474132fd544b7c
This commit is contained in:
parent
94ce143e06
commit
511d4dd90b
1 changed files with 4 additions and 2 deletions
|
|
@ -34,9 +34,11 @@
|
|||
|
||||
typedef unsigned chartype;
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
char* strcasestr (const char* haystack, const char* needle)
|
||||
char* strcasestr (const char* phaystack, const char* pneedle)
|
||||
{
|
||||
const char* match, *needle_search;
|
||||
const unsigned char *haystack = (const unsigned char *) phaystack;
|
||||
const unsigned char *needle = (const unsigned char *) pneedle;
|
||||
const unsigned char* match, *needle_search;
|
||||
chartype needle_ch, ch_h;
|
||||
chartype first_ch, first_upch;
|
||||
if (*needle == 0) /* if needle empty return haystack */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue