Commit 28812c88 authored by Руслан Ижбулатов's avatar Руслан Ижбулатов Committed by Simon McVittie

Handle 0x0d0a EOLs in spawn_dbus_daemon()

On W32 dbus daemon will print output in text mode, with 0x0d0a EOLs instead
of just 0x0a. Be able to handle that.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75863
Reviewed-by: Simon McVittie
parent c02ac705
......@@ -151,6 +151,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
if ((newline > address->str) && ('\r' == newline[-1]))
newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}
......
......@@ -119,6 +119,8 @@ spawn_dbus_daemon (gchar *binary,
if (newline != NULL)
{
if ((newline > address->str) && ('\r' == newline[-1]))
newline -= 1;
g_string_truncate (address, newline - address->str);
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment