Fix for crash in DohStrstr, bug #1190921
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7204 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
89e581e19c
commit
a10cfa80dd
1 changed files with 1 additions and 1 deletions
|
|
@ -1037,7 +1037,7 @@ int DohStrncmp(const DOHString_or_char *s1, const DOHString_or_char *s2, int n)
|
|||
char *DohStrstr(const DOHString_or_char *s1, const DOHString_or_char *s2) {
|
||||
char* p1 = Char(s1);
|
||||
char* p2 = Char(s2);
|
||||
return p2 == 0 || *p2 == '\0' ? p1 : strstr(p1,p2);
|
||||
return p1 == 0 || p2 == 0 || *p2 == '\0' ? p1 : strstr(p1,p2);
|
||||
}
|
||||
|
||||
char *DohStrchr(const DOHString_or_char *s1, int ch) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue