fixed crash in wxStrtok
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@8043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -171,6 +171,10 @@ int WXDLLEXPORT wxStricmp(const wxChar *psz1, const wxChar *psz2)
|
|||||||
#ifndef wxStrtok
|
#ifndef wxStrtok
|
||||||
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr)
|
WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr)
|
||||||
{
|
{
|
||||||
|
if (!(save_ptr && *save_ptr)) {
|
||||||
|
return (wxChar *) NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!psz) psz = *save_ptr;
|
if (!psz) psz = *save_ptr;
|
||||||
psz += wxStrspn(psz, delim);
|
psz += wxStrspn(psz, delim);
|
||||||
if (!*psz) {
|
if (!*psz) {
|
||||||
|
Reference in New Issue
Block a user