Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77175 - sandbox/big_number/boost/multiprecision
From: john_at_[hidden]
Date: 2012-03-03 10:25:36


Author: johnmaddock
Date: 2012-03-03 10:25:35 EST (Sat, 03 Mar 2012)
New Revision: 77175
URL: http://svn.boost.org/trac/boost/changeset/77175

Log:
Fix range error
Text files modified:
   sandbox/big_number/boost/multiprecision/cpp_int.hpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: sandbox/big_number/boost/multiprecision/cpp_int.hpp
==============================================================================
--- sandbox/big_number/boost/multiprecision/cpp_int.hpp (original)
+++ sandbox/big_number/boost/multiprecision/cpp_int.hpp 2012-03-03 10:25:35 EST (Sat, 03 Mar 2012)
@@ -1507,7 +1507,7 @@
    //
    // Strip leading zeros:
    //
- while(result.limbs()[result.size()-1] == 0)
+ while((result.size() > 1) && (result.limbs()[result.size()-1] == 0))
       result.resize(result.size()-1);
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk