diff --git a/libxrdp/xrdp_orders_rail.c b/libxrdp/xrdp_orders_rail.c index 0037b8ee..7bc7eed9 100644 --- a/libxrdp/xrdp_orders_rail.c +++ b/libxrdp/xrdp_orders_rail.c @@ -239,7 +239,7 @@ xrdp_orders_get_unicode_bytes(const char *text) else { /* calculate the number of bytes of the resulting null-terminated wide-string */ - num_chars = (num_chars + 1) * sizeof(twchar); + num_chars = (num_chars + 1) * 2; } return num_chars;