activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r589089 - /activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp
Date Sat, 27 Oct 2007 13:02:29 GMT
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;
             }



Mime
View raw message