corentin-soriano commented on code in PR #560:
URL: https://github.com/apache/guacamole-server/pull/560#discussion_r1966539239
##########
src/protocols/rdp/channels/disp.c:
##########
@@ -191,6 +193,15 @@ void guac_rdp_disp_update_size(guac_rdp_disp* disp,
int width = disp->requested_width;
int height = disp->requested_height;
+ int monitors_count = disp->requested_monitors;
+
+ /* Prevent opening too many monitors than allowed */
+ if (settings->max_secondary_monitors + 1 < monitors_count)
+ monitors_count = settings->max_secondary_monitors + 1;
Review Comment:
The +1 corresponds to the primary monitor.
For better readability I added a variable:
```c
/* Add one to account for the primary monitor */
int max_monitors = settings->max_secondary_monitors + 1;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]