From 72fa84b903b24f1a374a6090319fe2e4d839a4a7 Mon Sep 17 00:00:00 2001 From: Walter Negro Date: Thu, 30 May 2002 03:46:39 +0000 Subject: [PATCH] * contrib/libct/screen1.c ! Now return correctly a numeric value. --- harbour/contrib/libct/screen1.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/harbour/contrib/libct/screen1.c b/harbour/contrib/libct/screen1.c index 2bfb7c559a..e2cf42db4c 100644 --- a/harbour/contrib/libct/screen1.c +++ b/harbour/contrib/libct/screen1.c @@ -56,7 +56,7 @@ /* $DOC$ * $FUNCNAME$ - * SCREENATTE() + * SCREENATTR() * $CATEGORY$ * CT3 video functions * $ONELINER$ @@ -102,19 +102,19 @@ HB_FUNC( SCREENATTR ) iCol = hb_parni( 2 ); hb_gtRectSize( iRow, iCol, iRow, iCol, &uiSize ); - pcPos = (char * ) hb_xalloc( uiSize ); + pcPos = (char * ) hb_xalloc( uiSize + 1 ); if( pcPos != NULL ) { hb_gtSave( iRow, iCol, iRow, iCol, pcPos ); - pcPos[1] = pcPos[2]; - pcPos[2] = 0x00; - hb_retc_buffer( pcPos ); + hb_retni( ( int ) pcPos[1] ); } else - hb_retc( NULL ); + hb_retni( 0 ); + + hb_xfree( pcPos ); }