[Xfce4-commits] [apps/xfce4-terminal] 01/03: Check the index before accessing the array

noreply at xfce.org noreply at xfce.org
Sun Jun 12 19:58:57 CEST 2016


This is an automated email from the git hooks/post-receive script.

ochosi pushed a commit to branch master
in repository apps/xfce4-terminal.

commit 257849c2212754a9c0f374e90106643a47432044
Author: Igor <f2404 at yandex.ru>
Date:   Sun Jun 12 12:24:17 2016 +0300

    Check the index before accessing the array
    
    Signed-off-by: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
---
 terminal/terminal-preferences-dialog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/terminal/terminal-preferences-dialog.c b/terminal/terminal-preferences-dialog.c
index b4d3d26..ed43c9a 100644
--- a/terminal/terminal-preferences-dialog.c
+++ b/terminal/terminal-preferences-dialog.c
@@ -552,7 +552,7 @@ terminal_preferences_dialog_palette_notify (TerminalPreferencesDialog *dialog)
 
       /* apply values to buttons */
       if (colors != NULL)
-        for (i = 0; colors[i] != NULL && i < 16; i++)
+        for (i = 0; i < 16 && colors[i] != NULL; i++)
           {
             g_snprintf (name, sizeof (name), "color-palette%d", i + 1);
             obj = gtk_builder_get_object (GTK_BUILDER (dialog), name);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list