2013-09-20 15:42 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rdd/dbcmd.c
    ! fixed dbRSelect() to be compatible with undocumented Cl*pper behavior:
      When parameter is missing, wrong or 0 then 1 is used as relation number
This commit is contained in:
Przemysław Czerpak
2013-09-20 15:42:35 +02:00
parent c5db5dac72
commit 65bf59cd3b
2 changed files with 11 additions and 2 deletions

View File

@@ -10,6 +10,11 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-09-20 15:42 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rdd/dbcmd.c
! fixed dbRSelect() to be compatible with undocumented Cl*pper behavior:
When parameter is missing, wrong or 0 then 1 is used as relation number
2013-09-20 15:30 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/hbgtcore.c
! added explicit casting to strchr() result

View File

@@ -1741,11 +1741,15 @@ HB_FUNC( DBRELATION ) /* (<nRelation>) --> cLinkExp */
HB_FUNC( DBRSELECT ) /* (<nRelation>) --> nWorkArea */
{
HB_USHORT uiWorkArea = 0;
HB_USHORT uiWorkArea = 0, uiRelation = ( HB_USHORT ) hb_parni( 1 );
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
SELF_RELAREA( pArea, ( HB_USHORT ) hb_parni( 1 ), &uiWorkArea );
/* undocumented CA-Cl*pper behavior:
* When parameter is missing, wrong or 0 then 1 is used as
* relation number [druzus]
*/
SELF_RELAREA( pArea, uiRelation ? uiRelation : 1, &uiWorkArea );
hb_retni( uiWorkArea );
}