[nautilus/wip/ernestask/gtk4: 3/19] list-model: fix boolean expression



commit f7b348a0af160e28dc8d4ca25d0760b8f02fd491
Author: Ernestas Kulik <ernestask gnome org>
Date:   Sat Feb 24 19:37:17 2018 +0200

    list-model: fix boolean expression
    
    We’re checking if the column index is in the range, so using OR is not
    the right way to do that.

 src/nautilus-list-model.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/nautilus-list-model.c b/src/nautilus-list-model.c
index 177491dac..e700669e7 100644
--- a/src/nautilus-list-model.c
+++ b/src/nautilus-list-model.c
@@ -444,7 +444,7 @@ nautilus_list_model_get_value (GtkTreeModel *tree_model,
         break;
 
         default:
-            if (column >= NAUTILUS_LIST_MODEL_NUM_COLUMNS || column < NAUTILUS_LIST_MODEL_NUM_COLUMNS + 
priv->columns->len)
+            if (column >= NAUTILUS_LIST_MODEL_NUM_COLUMNS && column < NAUTILUS_LIST_MODEL_NUM_COLUMNS + 
priv->columns->len)
             {
                 NautilusColumn *nautilus_column;
                 GQuark attribute;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]