You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2004/12/13 03:25:43 UTC

cvs commit: ws-axis/c/src/common BasicTypeSerializer.cpp

samisa      2004/12/12 18:25:43

  Modified:    c/src/common BasicTypeSerializer.cpp
  Log:
  Fix for AXISCPP-320. Used %g in place of %f.
  According to the man page of sprintf %f causes the argument to be
  "rounded and converted", %g does not.
  
  Revision  Changes    Path
  1.36      +2 -2      ws-axis/c/src/common/BasicTypeSerializer.cpp
  
  Index: BasicTypeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/common/BasicTypeSerializer.cpp,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- BasicTypeSerializer.cpp	12 Nov 2004 11:38:57 -0000	1.35
  +++ BasicTypeSerializer.cpp	13 Dec 2004 02:25:43 -0000	1.36
  @@ -108,12 +108,12 @@
               m_sSZ += m_Buf;
               break;
           case XSD_FLOAT:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((float*)(pValue)));
  +            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%g", *((float*)(pValue)));
               m_sSZ += m_Buf;
               break;
           case XSD_DOUBLE:
           case XSD_DECIMAL:
  -            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((double*)(pValue)));
  +            AxisSprintf (m_Buf, BTS_BUFFSIZE, "%g", *((double*)(pValue)));
               m_sSZ += m_Buf;
               break;
           case XSD_STRING: