From 9d7b9853d0ef7feaeb33f7817e97de1f485adb33 Mon Sep 17 00:00:00 2001 From: Brian Hays Date: Thu, 21 Sep 2000 07:41:45 +0000 Subject: [PATCH] 2000-09-21 00:40 UTC+0800 Brian Hays --- harbour/ChangeLog | 6 ++++++ harbour/contrib/rdd_ads/ads1.c | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8f5dbd9607..a52d883114 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2000-09-21 00:40 UTC+0800 Brian Hays + * contrib/rdd_ads/ads1.c + ! fixed buffer allocation and item assignment in adsOrderListFocus + Bug was that a 10-byte tag name came back with an 11th garbage byte + 2000-09-19 20:00 GMT -3 Luiz Rafael Culik +contrib/pdflib/pdfhbdoc.c *Wraper functions for PDF generation for HBDOC @@ -12,6 +17,7 @@ +Added code to support PDF generation then compiled with -dPDF *contrib/rdd_ads/doc/en/adsfuncs.txt *small formating + 2000-09-20 23:36 UTC+0200 JFL (mafact) * harbour/include/hbsetup.ch + added a #define HB_CLS_ENFORCERO to enable full ReadOnly test on DATA diff --git a/harbour/contrib/rdd_ads/ads1.c b/harbour/contrib/rdd_ads/ads1.c index 0d5dd474d3..f606eda2ae 100644 --- a/harbour/contrib/rdd_ads/ads1.c +++ b/harbour/contrib/rdd_ads/ads1.c @@ -1083,8 +1083,8 @@ static ERRCODE adsOrderListClear( ADSAREAP pArea ) static ERRCODE adsOrderListFocus( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) { ADSHANDLE phIndex; - UNSIGNED8 pucName[11]; - UNSIGNED16 pusLen = 10; + UNSIGNED8 pucName[ADS_MAX_TAG_NAME]; + UNSIGNED16 pusLen = ADS_MAX_TAG_NAME; UNSIGNED16 usOrder; UNSIGNED32 ulRetVal; HB_TRACE(HB_TR_DEBUG, ("adsOrderListFocus(%p, %p)", pArea, pOrderInfo)); @@ -1093,7 +1093,8 @@ static ERRCODE adsOrderListFocus( ADSAREAP pArea, LPDBORDERINFO pOrderInfo ) *pucName = '\0'; else AdsGetIndexName( pArea->hOrdCurrent, pucName, &pusLen); - pOrderInfo->itmResult = hb_itemPutC( pOrderInfo->itmResult, (char*)pucName ); + + pOrderInfo->itmResult = hb_itemPutCL( pOrderInfo->itmResult, (char*)pucName, pusLen ); if( pOrderInfo->itmOrder ) {