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:
Stefan Csomor
2003-07-11 20:16:05 +00:00
parent 5a036f13b3
commit d314acc0ba

View File

@@ -1387,7 +1387,10 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt
#if __MSL__ < 0x00008000
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
int isascii( int c )