EBookBackendSqliteDB: Fixed a nasty bug causing descending order to not work properly...
authorTristan Van Berkom <tristanvb@openismus.com>
Mon, 17 Jun 2013 06:41:53 +0000 (15:41 +0900)
committerTristan Van Berkom <tristanvb@openismus.com>
Mon, 17 Jun 2013 07:36:34 +0000 (16:36 +0900)
addressbook/libedata-book/e-book-backend-sqlitedb.c

index edb9ed8..c2b73d8 100644 (file)
@@ -5426,8 +5426,8 @@ ebsdb_cursor_set_state (EBookBackendSqliteDB *ebsdb,
 
 #define GREATER_OR_LESS(cursor, index, reverse)                                \
        (reverse ?                                                      \
-        (((EbSdbCursor *)cursor)->sort_types[index == E_BOOK_SORT_ASCENDING] ? '>' : '<') : \
-        (((EbSdbCursor *)cursor)->sort_types[index == E_BOOK_SORT_ASCENDING] ? '<' : '>'))
+        (((EbSdbCursor *)cursor)->sort_types[index] == E_BOOK_SORT_ASCENDING ? '<' : '>') : \
+        (((EbSdbCursor *)cursor)->sort_types[index] == E_BOOK_SORT_ASCENDING ? '>' : '<'))
 
 static gchar *
 ebsdb_cursor_constraints (EBookBackendSqliteDB *ebsdb,