Fixed GPF on missing dot

This commit is contained in:
Antonio Linares
2003-08-21 09:28:43 +00:00
parent 739d148f77
commit cd412c2aad

View File

@@ -90,7 +90,10 @@ HB_FUNC( FILEEXT )
if( ISCHAR( 1 ) )
{
PHB_FNAME pFileName = hb_fsFNameSplit( hb_parc( 1 ) );
hb_retc( ( pFileName->szExtension ) + 1 ); /* Skip the dot */
if( pFileName->szExtension != NULL )
hb_retc( ( pFileName->szExtension ) + 1 ); /* Skip the dot */
else
hb_retc( "" );
hb_xfree( pFileName );
}
else