FRead() bug fixed, introduced cause 1 byte length strings optimization

This commit is contained in:
Antonio Linares
2003-07-12 11:01:41 +00:00
parent 40ac1bbb20
commit 44993f2a6e

View File

@@ -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 );