svn commit: r589089 - /activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r589089 - /activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp

nmittler-2
Author: nmittler
Date: Sat Oct 27 06:02:29 2007
New Revision: 589089

URL: http://svn.apache.org/viewvc?rev=589089&view=rev
Log:
[AMQCPP-150] When performing tight unmarshalling of compressed long long values (e.g. int and short), cast the values to unsigned, so that the sign bit will not appear in the resulting long

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp

Modified: activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp?rev=589089&r1=589088&r2=589089&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp Sat Oct 27 06:02:29 2007
@@ -409,13 +409,13 @@
             if( bs->readBoolean() ) {
                 return dataIn->readLong();
             } else {
-                return dataIn->readInt();
+                return (unsigned int)dataIn->readInt();
             }
 
         } else {
 
             if( bs->readBoolean()) {
-                return dataIn->readShort();
+                return (unsigned short)dataIn->readShort();
             } else {
                 return 0;
             }