[omniORB] bug in CORBA::Fixed::Fixed(const char*)

Luke Deller ldeller at xplantechnology.com
Wed Oct 20 13:01:56 BST 2004


Hi,

The CORBA spec indicates that leading and trailing zeroes of a fixed-point literal are significant.  I'm looking at version 3.0.3 of the CORBA spec, section 3.10.2, where it gives the examples that "0123.450d" is considered to be fixed<7,3> and "3000.00d" is fixed<6,2>.

However, the CORBA::Fixed::Fixed(const char*) constructor in omniORB strips out the leading and trailing zeroes of the given fixed point literal.  This affects omniORBpy too.

In src/lib/omniORB/orbcore/corbaFixed.cc, perhaps the NP_fromString function needs another optional parameter to indicate whether zeros should be stripped or not.  When this function is called from CORBA::Fixed::Fixed(CORBA::Double val) et al then the zeroes should be stripped, but when it is called from CORBA::Fixed::Fixed(const char*) then the zeroes shouldn't be stripped.

Regards,
Luke.



More information about the omniORB-list mailing list