out of memory for strdup handled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21899 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1387,7 +1387,10 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt
|
|||||||
#if __MSL__ < 0x00008000
|
#if __MSL__ < 0x00008000
|
||||||
char *strdup(const char *s)
|
char *strdup(const char *s)
|
||||||
{
|
{
|
||||||
return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ;
|
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
|
||||||
|
if ( dest )
|
||||||
|
strcpy( dest , s ) ;
|
||||||
|
return dest ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
int isascii( int c )
|
int isascii( int c )
|
||||||
|
Reference in New Issue
Block a user