[aisleriot] sol: Fix sort of game list
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] sol: Fix sort of game list
- Date: Sat, 3 Dec 2011 20:20:23 +0000 (UTC)
commit 3a94f1264eb2115e60200f6bf41b5b35b7a96581
Author: Christian Persch <chpe gnome org>
Date: Sat Dec 3 21:19:51 2011 +0100
sol: Fix sort of game list
src/game.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/game.c b/src/game.c
index c9cdef8..9eac26c 100644
--- a/src/game.c
+++ b/src/game.c
@@ -2650,6 +2650,13 @@ append_games_from_path (GHashTable *hash_table,
}
}
+static int
+compare (gconstpointer *a,
+ gconstpointer *b)
+{
+ return strcmp ((char *) *a, (char *) *b);
+}
+
/**
* ar_get_game_modules:
*
@@ -2691,7 +2698,7 @@ ar_get_game_modules (void)
}
g_hash_table_unref (hash_table);
- g_ptr_array_sort (array, (GCompareFunc) strcmp);
+ g_ptr_array_sort (array, (GCompareFunc) compare);
g_ptr_array_add (array, NULL);
return (char **) g_ptr_array_free (array, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]