You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by nm...@apache.org on 2007/10/27 15:02:29 UTC
svn commit: r589089 -
/activemq/activemq-cpp/trunk/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.cpp
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;
}