XPath: Added a workaround for MSVC6 wcsstr bug
git-svn-id: http://pugixml.googlecode.com/svn/trunk@708 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
a0a28b1c05
commit
fb0f5d8c94
@ -4889,7 +4889,8 @@ namespace
|
|||||||
const char_t* find_substring(const char_t* s, const char_t* p)
|
const char_t* find_substring(const char_t* s, const char_t* p)
|
||||||
{
|
{
|
||||||
#ifdef PUGIXML_WCHAR_MODE
|
#ifdef PUGIXML_WCHAR_MODE
|
||||||
return wcsstr(s, p);
|
// MSVC6 wcsstr bug workaround (if s is empty it always returns 0)
|
||||||
|
return (*p == 0) ? s : wcsstr(s, p);
|
||||||
#else
|
#else
|
||||||
return strstr(s, p);
|
return strstr(s, p);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user