From 97b1d094e5fcdfa1298218734b0df24288ecc491 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 27 Oct 2008 14:24:32 +0000 Subject: [PATCH] 2008-10-27 15:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/compiler/gencc.c ! Fixed -gc3 double number handling problem. Many thanks to Przemek for the fix. [TOMERGE 1.0] --- harbour/ChangeLog | 6 ++++++ harbour/source/compiler/gencc.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 566fd0eb65..d92ae47e62 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-10-27 15:24 UTC+0200 Viktor Szakats (harbour.01 syenar hu) + * source/compiler/gencc.c + ! Fixed -gc3 double number handling problem. + Many thanks to Przemek for the fix. + [TOMERGE 1.0] + 2008-10-27 15:18 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/rtl/tbrowse.prg * source/debug/debugger.prg diff --git a/harbour/source/compiler/gencc.c b/harbour/source/compiler/gencc.c index 2257dec548..a4ce4691df 100644 --- a/harbour/source/compiler/gencc.c +++ b/harbour/source/compiler/gencc.c @@ -1093,7 +1093,10 @@ static HB_GENC_FUNC( hb_p_pushdouble ) * This version keeps double calculation compatible with RT FL functions */ fprintf( cargo->yyc, "\thb_xvmPushDouble( * ( double * ) " ); - hb_compGenCString( cargo->yyc, &pFunc->pCode[ lPCodePos + 1 ], sizeof( double ) ); + { + double d = HB_PCODE_MKDOUBLE( &pFunc->pCode[ lPCodePos + 1 ] ); + hb_compGenCString( cargo->yyc, ( BYTE * ) &d, sizeof( double ) ); + } fprintf( cargo->yyc, ", %d, %d );\n", pFunc->pCode[ lPCodePos + 1 + sizeof( double ) ], pFunc->pCode[ lPCodePos + 1 + sizeof( double ) + sizeof( BYTE ) ] );