diff options
author | jsorg71 <jsorg71> | 2007-09-23 07:02:19 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-09-23 07:02:19 +0000 |
commit | f4024fc9265661f33ec73dd7b6a56a169fce3855 (patch) | |
tree | f655d88a443c109466b0f9c5ee1f5b7a90cba8d1 /xrdp/xrdp_login_wnd.c | |
parent | d1d5aac19c4bd961aa4e4a85e37b7f8a31992a24 (diff) | |
download | xrdp-proprietary-f4024fc9265661f33ec73dd7b6a56a169fce3855.tar.gz xrdp-proprietary-f4024fc9265661f33ec73dd7b6a56a169fce3855.zip |
unicode
Diffstat (limited to 'xrdp/xrdp_login_wnd.c')
-rw-r--r-- | xrdp/xrdp_login_wnd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index ac57a2c8..c4236bcc 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -288,7 +288,7 @@ xrdp_wm_show_edits(struct xrdp_wm* self, struct xrdp_bitmap* combo) b->tab_stop = 1; b->caption1 = (char*)g_malloc(256, 1); g_strncpy(b->caption1, value + 3, 255); - b->edit_pos = g_strlen(b->caption1); + b->edit_pos = g_mbstowcs(0, b->caption1, 0); if (self->login_window->focused_control == 0) { self->login_window->focused_control = b; @@ -296,8 +296,8 @@ xrdp_wm_show_edits(struct xrdp_wm* self, struct xrdp_bitmap* combo) if (g_strncmp(name, "username", 255) == 0) { g_strncpy(b->caption1, self->session->client_info->username, 255); - b->edit_pos = g_strlen(b->caption1); - if (g_strlen(b->caption1) > 0) + b->edit_pos = g_mbstowcs(0, b->caption1, 0); + if (b->edit_pos > 0) { username_set = 1; } |