From 6209da531a7809f1bcc1c2e72fd930568371e738 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 22 Oct 2007 19:04:33 +0000 Subject: [PATCH] 2007-10-22 21:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/rdd/wacore.c * harbour/source/rdd/dbcmd.c ! fixed registering workareas with numbers from 65280 to 65534 --- harbour/ChangeLog | 5 +++++ harbour/source/rdd/dbcmd.c | 10 +++++----- harbour/source/rdd/wacore.c | 5 ++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5912c45468..97b737864d 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-22 21:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/rdd/wacore.c + * harbour/source/rdd/dbcmd.c + ! fixed registering workareas with numbers from 65280 to 65534 + 2007-10-21 11:21 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) - contrib/directx/media - contrib/directx/samples diff --git a/harbour/source/rdd/dbcmd.c b/harbour/source/rdd/dbcmd.c index d232c1d361..ac1d297e7b 100644 --- a/harbour/source/rdd/dbcmd.c +++ b/harbour/source/rdd/dbcmd.c @@ -175,11 +175,11 @@ HB_FUNC( AFIELDS ) HB_FUNC( ALIAS ) { - USHORT uiArea; + int iArea; AREAP pArea; - uiArea = hb_parni( 1 ); - pArea = ( AREAP ) hb_rddGetWorkAreaPointer( uiArea ); + iArea = hb_parni( 1 ); + pArea = ( AREAP ) hb_rddGetWorkAreaPointer( iArea ); if( pArea ) { char szAlias[ HARBOUR_MAX_RDD_ALIAS_LENGTH + 1 ]; @@ -2102,13 +2102,13 @@ HB_FUNC( DBSETRELATION ) } else { - USHORT uiArea = hb_rddGetCurrentWorkAreaNumber(); + int iArea = hb_rddGetCurrentWorkAreaNumber(); hb_rddSelectWorkAreaAlias( hb_parcx( 1 ) ); if( hb_vmRequestQuery() ) return; uiChildArea = hb_rddGetCurrentWorkAreaNumber(); - hb_rddSelectWorkAreaNumber( uiArea ); + hb_rddSelectWorkAreaNumber( iArea ); } pChildArea = uiChildArea ? ( AREAP ) hb_rddGetWorkAreaPointer( uiChildArea ) : NULL; diff --git a/harbour/source/rdd/wacore.c b/harbour/source/rdd/wacore.c index 0f32c9379a..6e2a5dcfcf 100644 --- a/harbour/source/rdd/wacore.c +++ b/harbour/source/rdd/wacore.c @@ -133,7 +133,10 @@ HB_EXPORT USHORT hb_rddInsertAreaNode( const char *szDriver ) if( s_uiCurrArea >= s_uiWaNumMax ) { - int iSize = ( ( s_uiCurrArea + 256 ) >> 8 ) << 8; + int iSize = ( ( ( int ) s_uiCurrArea + 256 ) >> 8 ) << 8; + + if( iSize > HARBOUR_MAX_RDD_AREA_NUM ) + iSize = HARBOUR_MAX_RDD_AREA_NUM; if( s_uiWaNumMax == 0 ) {