From 44993f2a6e91dc2333deea21c97d1884ef6d00e0 Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Sat, 12 Jul 2003 11:01:41 +0000 Subject: [PATCH] FRead() bug fixed, introduced cause 1 byte length strings optimization --- harbour/source/rtl/philes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/harbour/source/rtl/philes.c b/harbour/source/rtl/philes.c index d915695d85..f2f60b2f9f 100644 --- a/harbour/source/rtl/philes.c +++ b/harbour/source/rtl/philes.c @@ -98,7 +98,9 @@ HB_FUNC( FREAD ) if( pItem->item.asString.bStatic || ( * pItem->item.asString.u.puiHolders ) > 1 ) - hb_itemPutC( pItem, hb_parc( 2 ) ); + // Warning: Don't use hb_itemPutC() here, as it fails if 1 byte buffer used + // cause 1 byte length strings optimization + hb_itemPutCPtr( pItem, hb_strdup( hb_parc( 2 ) ), hb_parclen( 2 ) ); ulRead = hb_parnl( 3 );