[pure-lang-svn] SF.net SVN: pure-lang: [364] pure/trunk/runtime.cc
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-07-02 08:02:22
|
Revision: 364 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=364&view=rev Author: agraef Date: 2008-07-02 01:02:31 -0700 (Wed, 02 Jul 2008) Log Message: ----------- Bugfix: bigint->int conversion dropped sign. Modified Paths: -------------- pure/trunk/runtime.cc Modified: pure/trunk/runtime.cc =================================================================== --- pure/trunk/runtime.cc 2008-07-02 08:01:36 UTC (rev 363) +++ pure/trunk/runtime.cc 2008-07-02 08:02:31 UTC (rev 364) @@ -1689,7 +1689,7 @@ assert(x); switch (x->tag) { case EXPR::INT: return x; - case EXPR::BIGINT: return pure_int(mpz_get_ui(x->data.z)); + case EXPR::BIGINT: return pure_int(mpz_get_si(x->data.z)); case EXPR::DBL: return pure_int((int32_t)x->data.d); #if SIZEOF_VOID_P==8 // Must cast to 64 bit here first, since on 64 bit systems g++ gives an This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |