From 61944caf120e7b24e89db652a71b2d40880d3131 Mon Sep 17 00:00:00 2001 From: Ryszard Glab Date: Sat, 13 Dec 2003 16:01:13 +0000 Subject: [PATCH] 2003-12-13 17:05 UTC+0100 Ryszard Glab * source/vm/codebloc.c * fixed initialization of detached variables --- harbour/ChangeLog | 5 +++++ harbour/source/vm/codebloc.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3cb3c89a6a..86510ed7fb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2002-12-01 23:12 UTC+0100 Foo Bar */ +2003-12-13 17:05 UTC+0100 Ryszard Glab + * source/vm/codebloc.c + * fixed initialization of detached variables + + 2003-12-12 11:45 UTC-0800 Luis Krause Mantilla * source/rdd/dbcmd.c ! Fixed dbSelectArea() bug reported by Giovi Verrua diff --git a/harbour/source/vm/codebloc.c b/harbour/source/vm/codebloc.c index 337fa80196..3a25c630df 100644 --- a/harbour/source/vm/codebloc.c +++ b/harbour/source/vm/codebloc.c @@ -110,11 +110,6 @@ HB_CODEBLOCK_PTR hb_codeblockNew( BYTE * pBuffer, */ pLocal = hb_stackItemFromBase( *pLocalPosTable++ ); - if( HB_IS_BYREF( pLocal ) ) - { - pLocal = hb_itemUnRef( pLocal ); - } - if( ! HB_IS_MEMVAR( pLocal ) ) { /* Change the value only if this variable is not referenced @@ -123,6 +118,11 @@ HB_CODEBLOCK_PTR hb_codeblockNew( BYTE * pBuffer, * pool so it can be shared by codeblocks */ + if( HB_IS_BYREF( pLocal ) ) + { + pLocal = hb_itemUnRef( pLocal ); + } + hMemvar = hb_memvarValueNew( pLocal, FALSE ); pLocal->type = HB_IT_BYREF | HB_IT_MEMVAR;