mirror of https://github.com/xqemu/xqemu.git
qga: use wide-chars constants for wchar_t comparisons
Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
6771197dff
commit
6c6916dac8
|
@ -1323,8 +1323,10 @@ get_net_error_message(gint error)
|
|||
if (msg != NULL) {
|
||||
nchars = wcslen(msg);
|
||||
|
||||
if (nchars > 2 && msg[nchars-1] == '\n' && msg[nchars-2] == '\r') {
|
||||
msg[nchars-2] = '\0';
|
||||
if (nchars > 2 &&
|
||||
msg[nchars - 1] == L'\n' &&
|
||||
msg[nchars - 2] == L'\r') {
|
||||
msg[nchars - 2] = L'\0';
|
||||
}
|
||||
|
||||
retval = g_utf16_to_utf8(msg, -1, NULL, NULL, NULL);
|
||||
|
|
Loading…
Reference in New Issue