[omniORB] Fixed substruction bug

Slava Garelin garelin@ukr.net
Tue Feb 25 11:27:01 2003


Hello, Duncan.

Next code illegal worked in Omni :

    CORBA::Fixed a("1"),b("0"),c;                    
                                 
    cout << " A= " << a.NP_asString() << endl;
    cout << " B= " << b.NP_asString() << endl;
    cout << " C= " << c.NP_asString() << endl;
                                              
    c=b-a;                                    


 A= 1
 B= 0
 C= 0
omniORB: Assertion failed.  This indicates a bug in the application using
omniORB, or maybe in omniORB itself. e.g. using the ORB after it has
been shut down.
 file: corbaFixed.cc
 line: 801
 info: bi = b.fixed_digits()
Caught omniORB::fatalException:
  file: corbaFixed.cc
  line: 801
  mesg: bi = b.fixed_digits()



Our problem in this : CORBA::Fixed 0 have 0 fixed_digits.


Very simple patch:
======================
+++ ./src/lib/omniORB/orbcore/corbaFixed.cc     Tue Feb 25 12:19:08 2003
@@ -799,5 +799,5 @@
     work[wi++] = v;
   }
-  OMNIORB_ASSERT(bi = b.fixed_digits());
+  bi = b.fixed_digits();
   OMNIORB_ASSERT(carry == 0);

======================

-- 
Slava Garelin