@@ -2138,18 +2138,13 @@ BOOL gcc_read_client_monitor_data(wStream* s, rdpMcs* mcs)
2138
2138
2139
2139
for (UINT32 index = 0 ; index < monitorCount ; index ++ )
2140
2140
{
2141
- INT32 left = 0 ;
2142
- INT32 top = 0 ;
2143
- INT32 right = 0 ;
2144
- INT32 bottom = 0 ;
2145
- INT32 flags = 0 ;
2146
2141
rdpMonitor * current = & settings -> MonitorDefArray [index ];
2147
2142
2148
- Stream_Read_INT32 ( s , left ); /* left */
2149
- Stream_Read_INT32 ( s , top ); /* top */
2150
- Stream_Read_INT32 ( s , right ); /* right */
2151
- Stream_Read_INT32 ( s , bottom ); /* bottom */
2152
- Stream_Read_INT32 ( s , flags ); /* flags */
2143
+ const INT32 left = Stream_Get_INT32 ( s ); /* left */
2144
+ const INT32 top = Stream_Get_INT32 ( s ); /* top */
2145
+ const INT32 right = Stream_Get_INT32 ( s ); /* right */
2146
+ const INT32 bottom = Stream_Get_INT32 ( s ); /* bottom */
2147
+ const UINT32 flags = Stream_Get_UINT32 ( s ); /* flags */
2153
2148
current -> x = left ;
2154
2149
current -> y = top ;
2155
2150
current -> width = right - left + 1 ;
@@ -2205,19 +2200,19 @@ BOOL gcc_write_client_monitor_data(wStream* s, const rdpMcs* mcs)
2205
2200
for (UINT32 i = 0 ; i < settings -> MonitorCount ; i ++ )
2206
2201
{
2207
2202
const rdpMonitor * current = & settings -> MonitorDefArray [i ];
2208
- const UINT32 left = WINPR_ASSERTING_INT_CAST ( uint32_t , current -> x - baseX ) ;
2209
- const UINT32 top = WINPR_ASSERTING_INT_CAST ( uint32_t , current -> y - baseY ) ;
2210
- const UINT32 right = left + WINPR_ASSERTING_INT_CAST ( uint32_t , current -> width - 1 ) ;
2211
- const UINT32 bottom = top + WINPR_ASSERTING_INT_CAST ( uint32_t , current -> height - 1 ) ;
2203
+ const INT32 left = current -> x - baseX ;
2204
+ const INT32 top = current -> y - baseY ;
2205
+ const INT32 right = left + current -> width - 1 ;
2206
+ const INT32 bottom = top + current -> height - 1 ;
2212
2207
const UINT32 flags = current -> is_primary ? MONITOR_PRIMARY : 0 ;
2213
2208
WLog_DBG (TAG ,
2214
- "Monitor[%" PRIu32 "]: top=%" PRIu32 ", left=%" PRIu32 ", bottom=%" PRIu32
2215
- ", right=%" PRIu32 ", flags=%" PRIu32 ,
2209
+ "Monitor[%" PRIu32 "]: top=%" PRId32 ", left=%" PRId32 ", bottom=%" PRId32
2210
+ ", right=%" PRId32 ", flags=%" PRIu32 ,
2216
2211
i , top , left , bottom , right , flags );
2217
- Stream_Write_UINT32 (s , left ); /* left */
2218
- Stream_Write_UINT32 (s , top ); /* top */
2219
- Stream_Write_UINT32 (s , right ); /* right */
2220
- Stream_Write_UINT32 (s , bottom ); /* bottom */
2212
+ Stream_Write_INT32 (s , left ); /* left */
2213
+ Stream_Write_INT32 (s , top ); /* top */
2214
+ Stream_Write_INT32 (s , right ); /* right */
2215
+ Stream_Write_INT32 (s , bottom ); /* bottom */
2221
2216
Stream_Write_UINT32 (s , flags ); /* flags */
2222
2217
}
2223
2218
}
0 commit comments