[channels,rdpei] fix sign conversion

This commit is contained in:
akallabeth
2025-01-07 09:55:34 +01:00
parent c535d8d4a6
commit 671c6d21ba

View File

@@ -191,11 +191,11 @@ BOOL rdpei_read_4byte_unsigned(wStream* s, UINT32* value)
break;
case 3:
*value = ((byte & 0x3F) << 24) & 0xFF000000;
*value = ((UINT32)(byte & 0x3F) << 24) & 0xFF000000;
Stream_Read_UINT8(s, byte);
*value |= ((byte << 16) & 0xFF0000);
*value |= ((UINT32)(byte << 16) & 0xFF0000);
Stream_Read_UINT8(s, byte);
*value |= ((byte << 8) & 0xFF00);
*value |= ((UINT32)(byte << 8) & 0xFF00);
Stream_Read_UINT8(s, byte);
*value |= byte;
break;