[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/protocols/oscar/liboscar
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2008-02-08 23:00:18
Message-ID: 1202511618.332191.25098.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 772517 by chehrlic:

cast to byte *after* shifting

 M  +6 -6      buffer.cpp  


--- trunk/KDE/kdenetwork/kopete/protocols/oscar/liboscar/buffer.cpp #772516:772517
@@ -608,15 +608,15 @@
 	{
 		if ( block.type == BWord )
 		{
-			mBuffer[block.pos++] = (unsigned char) (size & 0x0000ff00) >> 8;
-			mBuffer[block.pos++] = (unsigned char) (size & 0x000000ff) >> 0;
+			mBuffer[block.pos++] = (unsigned char) ((size & 0x0000ff00) >> 8);
+			mBuffer[block.pos++] = (unsigned char) ((size & 0x000000ff) >> 0);
 		}
 		else if ( block.type == BDWord )
 		{
-			mBuffer[block.pos++] = (unsigned char) (size & 0xff000000) >> 24;
-			mBuffer[block.pos++] = (unsigned char) (size & 0x00ff0000) >> 16;
-			mBuffer[block.pos++] = (unsigned char) (size & 0x0000ff00) >> 8;
-			mBuffer[block.pos++] = (unsigned char) (size & 0x000000ff) >> 0;
+			mBuffer[block.pos++] = (unsigned char) ((size & 0xff000000) >> 24);
+			mBuffer[block.pos++] = (unsigned char) ((size & 0x00ff0000) >> 16);
+			mBuffer[block.pos++] = (unsigned char) ((size & 0x0000ff00) >> 8);
+			mBuffer[block.pos++] = (unsigned char) ((size & 0x000000ff) >> 0);
 		}
 	}
 	else
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic