summaryrefslogtreecommitdiff
path: root/daemon/gdm-local-display-factory.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2021-07-27 07:03:47 -0400
committerRay Strode <rstrode@redhat.com>2021-07-27 07:03:47 -0400
commitbf9ecc62100032ede9d981529ff5943c07315509 (patch)
tree24613161395f3bf69318f978f882685410e7de6b /daemon/gdm-local-display-factory.c
parentb1ba6a99ef741a26dc2cfb2a1974149eb2f38f49 (diff)
downloadgdm-bf9ecc62100032ede9d981529ff5943c07315509.tar.gz
local-display-factory: Add missing continue statements
commit f4922c046607c45d76e2911aa8f133d0ad4f9223 tried to fix an overrun in the code, but it neglected to add "continue" statements to the loops, so it was stuffing two different values into the same element of an array, which leads to the wrong session type getting preference. This commit fixes that.
Diffstat (limited to 'daemon/gdm-local-display-factory.c')
-rw-r--r--daemon/gdm-local-display-factory.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index f2da3b6e..141d64c6 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -246,6 +246,7 @@ gdm_local_display_factory_get_session_type (GdmLocalDisplayFactory *factory,
if (gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled)) {
if (wayland_enabled && g_file_test ("/usr/bin/Xwayland", G_FILE_TEST_IS_EXECUTABLE)) {
session_types[i] = "wayland";
+ continue;
}
}
}
@@ -257,6 +258,7 @@ gdm_local_display_factory_get_session_type (GdmLocalDisplayFactory *factory,
if (gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled)) {
if (xorg_enabled && g_file_test ("/usr/bin/Xorg", G_FILE_TEST_IS_EXECUTABLE)) {
session_types[i] = "x11";
+ continue;
}
}
}