From 42d5b4139ca1d990397332c6a7cbf326a95396fa Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 11 Oct 2008 12:49:45 +0000 Subject: [PATCH] 2008-10-11 14:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/rtl/fnsplit.c * source/rtl/hbtoken.c ! HB_FNAMESPLIT(), HB_TOKENPTR() fixed to reset parameters passed by reference in error cases. --- harbour/ChangeLog | 7 +++++++ harbour/source/rtl/fnsplit.c | 16 ++++++---------- harbour/source/rtl/hbtoken.c | 3 +++ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2cbe27ab56..cb7bae3318 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,13 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-11 14:49 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/rtl/fnsplit.c + * source/rtl/hbtoken.c + ! HB_FNAMESPLIT(), HB_TOKENPTR() fixed to + reset parameters passed by reference in + error cases. + 2008-10-11 13:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rtl/tget.prg ! fixed cursor positioning when new get item is added. diff --git a/harbour/source/rtl/fnsplit.c b/harbour/source/rtl/fnsplit.c index 52e70fbcbc..ac760c06a7 100644 --- a/harbour/source/rtl/fnsplit.c +++ b/harbour/source/rtl/fnsplit.c @@ -55,17 +55,14 @@ HB_FUNC( HB_FNAMESPLIT ) { - if( ISCHAR( 1 ) ) - { - PHB_FNAME pFileName = hb_fsFNameSplit( hb_parc( 1 ) ); + PHB_FNAME pFileName = hb_fsFNameSplit( hb_parcx( 1 ) ); - hb_storc( pFileName->szPath, 2 ); - hb_storc( pFileName->szName, 3 ); - hb_storc( pFileName->szExtension, 4 ); - hb_storc( pFileName->szDrive, 5 ); + hb_storc( pFileName->szPath, 2 ); + hb_storc( pFileName->szName, 3 ); + hb_storc( pFileName->szExtension, 4 ); + hb_storc( pFileName->szDrive, 5 ); - hb_xfree( pFileName ); - } + hb_xfree( pFileName ); } HB_FUNC( HB_FNAMEMERGE ) @@ -80,4 +77,3 @@ HB_FUNC( HB_FNAMEMERGE ) hb_retc( hb_fsFNameMerge( szFileName, &pFileName ) ); } - diff --git a/harbour/source/rtl/hbtoken.c b/harbour/source/rtl/hbtoken.c index 708990f9d9..e3c7475016 100644 --- a/harbour/source/rtl/hbtoken.c +++ b/harbour/source/rtl/hbtoken.c @@ -276,7 +276,10 @@ HB_FUNC( HB_TOKENPTR ) hb_retclen( szToken, ulToken ); } else + { + hb_stornl( 0, 2 ); hb_retc( NULL ); + } } HB_FUNC( HB_ATOKENS )