virt-viewer: Fix comparison in domain selection

Related: rhbz#1399077

Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This commit is contained in:
Pavel Grunt 2017-03-15 18:10:44 +01:00
parent 11d8676ba4
commit 66b2cbb8a4

View File

@ -110,7 +110,7 @@ opt_domain_selection_cb(const gchar *option_name,
return FALSE;
}
for (i = DOMAIN_SELECTION_ID; i <= G_N_ELEMENTS(domain_selection_to_opt); i++) {
for (i = DOMAIN_SELECTION_ID; i < G_N_ELEMENTS(domain_selection_to_opt); i++) {
if (g_strcmp0(option_name, domain_selection_to_opt[i]) == 0) {
domain_selection_type = i;
return TRUE;