Boost logo

Boost :

From: Alexei Alexandrov (alexei1.alexandrov2_at_[hidden])
Date: 2006-02-26 13:06:58


Hi,

while digging some boost things I noticed a minor bug in Boost.Serialization Dinkumware workarounds file archive/dinkumware.hpp. Probably it doesn't affect the functionality, but nevertheless is nice to be fixed. Workaround for outstreaming 64-bit numbers contain a bug for hex numbers. The following micropatch solves the problem:

***************
*** 52,58 ****
      unsigned int i = 0;
      do{
          unsigned int j = t % radix;
! d[i++] = j + ((j < 10) ? '0' : 'a');
          t /= radix;
      }
      while(t > 0);
--- 52,58 ----
      unsigned int i = 0;
      do{
          unsigned int j = t % radix;
! d[i++] = j + ((j < 10) ? '0' : ('a' - 10));
          t /= radix;
      }
      while(t > 0);


--
Alexei Alexandrov


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk