diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-29 20:58:11 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-08-29 20:58:11 +0000 |
commit | fb0f5d8c94d6a7ecb830656419e914a3ea4c0c7c (patch) | |
tree | dcb0dea2861f009ac34105675c7aee8997490421 /src/pugixml.cpp | |
parent | a0a28b1c05f65a9dd819e5582c4269cc6c35b1fd (diff) |
XPath: Added a workaround for MSVC6 wcsstr bug
git-svn-id: http://pugixml.googlecode.com/svn/trunk@708 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixml.cpp')
-rw-r--r-- | src/pugixml.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 5158a02..0b31cf1 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -4889,7 +4889,8 @@ namespace const char_t* find_substring(const char_t* s, const char_t* p) { #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 return strstr(s, p); #endif |